PalletDataGenerator Documentationο
A professional Python library for generating high-quality synthetic pallet datasets using Blender for computer vision and machine learning applications.
Version 0.1.3 Release π
This documentation covers PalletDataGenerator v0.1.3, featuring a completely redesigned unified architecture, embedded configuration system, and enhanced batch processing capabilities.
π― Overviewο
PalletDataGenerator is a comprehensive, production-ready solution for creating photorealistic synthetic datasets of pallets and warehouse environments. Designed with professional computer vision workflows in mind, it bridges the gap between research needs and industry-grade dataset generation.
β¨ Key Featuresο
π¬ Dual Generation Modes: Single pallet focus and complex warehouse scenarios
π Multiple Export Formats: YOLO, COCO JSON, and PASCAL VOC XML annotations
π― Advanced Keypoints Generation: Automatic face detection with 6 keypoints per face, visibility tracking, and 3D debug visualization
π 3D Debug Visualization: Interactive HTML figures and coordinate tracking for keypoints analysis
β‘ GPU-Accelerated Rendering: High-performance generation with Blender Cycles
π§ Unified Architecture: Single
PalletDataGenerator
class with embedded configurationπ¦ Auto-Batch Management: Organized
generated_XXXX
batch folders with sequencingποΈ Modular Design: Clean, extensible, and thoroughly tested codebase
π Photorealistic Results: Advanced lighting, materials, and post-processing
π³ Docker Ready: Complete containerization for deployment
π Quick Startο
Installationο
# Install the package
pip install palletdatagenerator
# Or install from source
git clone https://github.com/boubakriibrahim/PalletDataGenerator.git
cd PalletDataGenerator
pip install -e .
Basic Usageο
Basic Usageο
Generate Warehouse Datasetο
# Generate 50 warehouse scene images with multiple pallets and boxes
palletgen -m warehouse scenes/warehouse_objects.blend
# Custom configuration
palletgen -m warehouse scenes/warehouse_objects.blend \
--frames 100 \
--resolution 1920 1080 \
--output custom_output_dir
Generate Single Pallet Datasetο
# Generate focused single pallet images
palletgen -m single_pallet scenes/one_pallet.blend
# High-resolution batch
palletgen -m single_pallet scenes/one_pallet.blend \
--frames 200 \
--resolution 2048 1536
Using Python APIο
from palletdatagenerator import PalletDataGenerator
# Create generator instance
generator = PalletDataGenerator(
scene_path="scenes/warehouse_objects.blend",
mode="warehouse",
output_dir="output"
)
# Generate dataset
generator.generate_dataset(num_frames=50)
π Documentationο
API Reference
ποΈ Architecture Overviewο
βββββββββββββββββββββββββββββββββββββββ
β PalletDataGenerator β
β ββββββββββββββββ βββββββββββββββββββ
β β DefaultConfigβ β Mode System ββ
β β System β β βββββββββββββββββ
β ββββββββββββββββ β βSinglePallet βββ
β β β βββββββββββββββββ
β β β βββββββββββββββββ
β βββββββββββ€ β Warehouse βββ
β β βββββββββββββββββ
β βββββββββββββββββββ
β βββββββββββββββββββββββββββββββββββ β
β β Blender Integration β β
β β βββββββββββ βββββββββββββββββββ β β
β β β Scene β β Renderer β β β
β β βValidatorβ β β β β
β β βββββββββββ βββββββββββββββββββ β β
β βββββββββββββββββββββββββββββββββββ β
β βββββββββββββββββββββββββββββββββββ β
β β Export System β β
β β βββββββββββββββββββββββββββββββ β β
β β β YOLO ββ COCO ββ VOC β β β
β β βββββββββββββββββββββββββββββββ β β
β βββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββ
π Key Features v0.1.3ο
π― Advanced Keypoints Generationο
Selective face detection: Detects 1-2 most visible faces from the pallet (not all faces)
6 keypoints per selected face: 2 middle (top-down), 2 left (top-down), 2 right (top-down)
Visibility tracking: Ray casting for occlusion detection between face and camera
YOLO format output: Normalized coordinates with visibility flags (2=visible, 0=hidden)
Analysis visualization: Keypoints with different colors for visible/hidden states
π 3D Debug Visualizationο
Interactive HTML figures: Real-time 3D visualization using Plotly.js
Face selection analysis: Shows which faces were chosen and why
Camera positioning: Distance calculations to each face with visual lines
Coordinate tracking: Detailed 3D coordinate information for debugging
Debug output structure:
debug_3d/
folder with coordinates, figures, and images
π Enhanced Output Structureο
keypoints_labels/: YOLO format keypoints annotations
face_2d_boxes/: 2D bounding boxes for detected faces
face_3d_coordinates/: 3D coordinates for keypoints
debug_3d/coordinates/: Detailed coordinate information
debug_3d/figures/: Interactive HTML 3D figures
debug_3d/images/: 3D debug visualization images
π Key Features v0.1.2ο
π Unified Generatorο
Single entry point for all generation modes
Embedded configuration with sensible defaults
Automatic batch folder management
π Auto-Batch Managementο
output/
βββ single_pallet/
β βββ generated_000001/
β βββ generated_000002/
β βββ generated_000003/
βββ warehouse/
βββ generated_000001/
βββ generated_000002/
π― Export Formatsο
YOLO:
.txt
files with normalized bounding boxes and keypointsCOCO:
.json
with comprehensive metadataPASCAL VOC:
.xml
files for compatibility
πΌοΈ Multi-Modal Outputsο
Each generated frame includes:
RGB images (
images/
)Analysis overlays (
analysis/
) with keypoints visualizationDepth maps (
depth/
)Normal maps (
normals/
)Index maps (
index/
)Keypoints labels (
keypoints_labels/
) in YOLO format3D debug visualization (
debug_3d/
) with interactive HTML figuresFace coordinate tracking (
face_2d_boxes/
,face_3d_coordinates/
)
π‘ Quick Examplesο
Generate 100 Warehouse Imagesο
palletgen -m warehouse scenes/warehouse_objects.blend -f 100
High-Resolution Single Pallet Datasetο
palletgen -m single_pallet scenes/one_pallet.blend \
--frames 200 \
--resolution 2048 1536
Python API Usageο
from palletdatagenerator import PalletDataGenerator
generator = PalletDataGenerator(
scene_path="scenes/warehouse_objects.blend",
mode="warehouse",
output_dir="my_dataset"
)
# Generate with custom settings
generator.generate_dataset(
num_frames=100,
resolution=(1920, 1080)
)
π Learning Resourcesο
π Quick Start Guide: Get up and running in minutes
π Installation Guide: Detailed setup instructions
π― Keypoints Generation Guide: Advanced face detection and keypoints tracking
π§ API Reference: Complete API documentation
π Changelog: Version history and migration guides
π€ Community & Supportο
π Report Issues
π¬ Discussions
π§ Email: ibrahimbouakri1@gmail.com
π Whatβs New in v0.1.3
π― Advanced Keypoints Generation: Automatic face detection with 6 keypoints per selected face
Selective face detection (1-2 most visible faces, not all faces)
Visibility tracking with ray casting for occlusion detection
YOLO format output with visibility flags
π 3D Debug Visualization: Interactive HTML figures and coordinate tracking
Real-time 3D visualization using Plotly.js
Face selection analysis and camera positioning
Comprehensive debug output structure
π Enhanced Output Structure: New directories for comprehensive debugging
keypoints_labels/
,face_2d_boxes/
,face_3d_coordinates/
debug_3d/
with coordinates, figures, and images
π Improved Documentation: Updated guides and examples with real data
- **Storage**: 1GB+ free space per 1000 generated images
## π€ Contributing
We welcome contributions! Please see our [Contributing Guide](development.md) for details.
### Development Setup
```bash
# Clone the repository
git clone https://github.com/boubakriibrahim/PalletDataGenerator.git
cd PalletDataGenerator
# Set up development environment
python -m palletdatagenerator setup --python-version 3.11
# Activate virtual environment
source pallet_env/bin/activate # Linux/Mac
# or
pallet_env\Scripts\activate # Windows
# Install in development mode
pip install -e ".[dev]"
# Run tests
pytest tests/
π Licenseο
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgmentsο
Blender Foundation for the amazing Blender software
Computer Vision Community for dataset format standards
Contributors who help improve this library
π Supportο
Documentation: https://boubakriibrahim.github.io/PalletDataGenerator
Issues: GitHub Issues
Discussions: GitHub Discussions
Made with β€οΈ for the Computer Vision Community