palletdatagenerator.modes.warehouse moduleο
Warehouse Mode - Based on original warehouse_generator.py
Implements the exact forklift simulation, camera paths, and generation logic from the original warehouse generator.
- class palletdatagenerator.modes.warehouse.WarehouseMode(config)[source]ο
Bases:
BaseGenerator
Warehouse generation mode with forklift simulation and camera paths. Replicates the exact behavior of the original warehouse_generator.py
- generate_frames()[source]ο
Main warehouse generation loop exactly as in original warehouse_generator.py
- find_warehouse_objects()[source]ο
Find and categorize warehouse objects by collections (object.XXX structure).
- generate_warehouse_path(scene_objects)[source]ο
Generate a forklift-like camera path through the warehouse.
- position_camera_on_path(cam_obj, camera_path, progress)[source]ο
Position camera along the forklift path with realistic movement.
- randomize_scene_objects(scene_objects)[source]ο
Randomize scene objects and replace hidden boxes with generated groups - collection-aware approach.
- generate_pallet_box_group(pallet, box_templates)[source]ο
Generate a group of boxes on a pallet - EXACT logic from original warehouse generator.
- find_pallet_box_relationships(scene_objects)[source]ο
Find relationships between pallets and their boxes.
- get_visible_pallets(scene_objects, cam_obj, sc)[source]ο
Get pallets that are visible in the current camera view.
- save_warehouse_frame_outputs(frame_id, img_filename, img_path, visible_pallets, cam_obj, sc, coco_data, meta)[source]ο
Save all outputs for a warehouse frame.
- write_warehouse_annotations(visible_pallets, coco_data, img_id, img_w, img_h, cam_obj, sc)[source]ο
Write COCO and YOLO annotations for warehouse scene.