palletdatagenerator package

Subpackages

Submodules

Module contents

PalletDataGenerator - Unified Blender library for synthetic pallet dataset generation.

This library provides a simplified, unified approach to generating synthetic pallet datasets with embedded configuration and auto-batch management.

class palletdatagenerator.PalletDataGenerator(mode: str = 'single_pallet', scene_path: str | None = None)[source]

Bases: object

Main generator that delegates to appropriate mode classes. Replicates the exact functionality of original files using modular architecture.

__init__(mode: str = 'single_pallet', scene_path: str | None = None)[source]
generate(scene_path: Path | None = None, num_frames: int = 50, output_dir: Path | None = None, resolution: tuple[int, int] | None = None) dict[str, Any][source]

Generate dataset using the appropriate mode class.

class palletdatagenerator.DefaultConfig(mode: str = 'single_pallet')[source]

Bases: object

Configuration class that adapts based on mode.

__getattr__(name)[source]

Allow dict-style access to config values.

__init__(mode: str = 'single_pallet')[source]

Initialize config based on mode.

__setattr__(name, value)[source]

Allow setting config values.

get(key, default=None)[source]

Dict-style get method.

update(**kwargs)[source]

Update multiple config values.

palletdatagenerator.setup_logging(level: str = 'DEBUG', log_file: str = 'output.log') None[source]

Setup logging configuration.

Parameters:
  • level – Logging level (β€˜DEBUG’, β€˜INFO’, β€˜WARNING’, β€˜ERROR’)

  • log_file – Optional log file path