A toolkit for generating synthetic datasets for 6DOF object pose estimation
-
Multi-format output: Generates datasets compatible with DOPE, EfficientPose, YOLO6DPose, and BOP formats
-
Background randomization: Supports both HDR and regular background images with automatic augmentation
conda env update --name 6dof_datasetgen --file 6dof_datasetgen_env.yml --prune
conda activate 6dof_datasetgenblenderproc quickstart # This will install everything to work with BlenderProcblenderproc pip install pyquaternion tqdmDownload 3D models and place them in the models/ folder:
- Download link: 3D Models
- Supported formats:
.plyfiles - Naming convention:
obj_1.ply,obj_2.ply, etc.
Download background images and place them in the backgrounds/ folder:
- HDRI source: Poly Haven HDRIs
- Supported formats:
.hdr,.png,.jpg,.jpeg - The toolkit automatically detects HDR vs regular images
Generate synthetic data with objects moving randomly around the scene:
blenderproc run syntetic_data_example0.pyGenerate synthetic data with precise object control using utility functions:
blenderproc run syntetic_data_example1.pyThe toolkit includes specialized functions for object manipulation (available at line 610+ in example1):
close_up_position(): Centers objects with Y-axis variation onlyclose_up_left_right_position(): Positions objects with X and Y axis controlturn_around_rotation_during_frames(): Rotates objects 360° across all framesturn_around_rotation(): Applies fixed rotation angles
The toolkit generates multiple dataset formats simultaneously:
datasets/dope_data/
├── 000000.png
├── 000000.json
└── ...
datasets/YOLO6DPose_data/
├── JPEGImages/
├── labels/ # 29-value format per object
└── mask/
datasets/bop_data/lm/train_pbr/000000/
├── rgb/
├── depth/
├── mask/
├── scene_gt.json
├── scene_gt_info.json
└── scene_camera.json
datasets/efficientpose_data/data/01/
├── rgb/
├── depth/
├── mask/
├── gt.yml
├── info.yml
├── train.txt
└── test.txt
Key parameters in the main scripts:
nb_frames = 5 # Number of frames to generate
width = 512 # Image width
height = 512 # Image height
scale = 0.01 # Object scale (meters: 0.01, cm: 1.0, mm: 0.001)
target_obj_idx = 0 # Target object index for YOLO6DPose and EfficientPoseAfter running the generation, you'll find:
datasets/
├── dope_data/ # DOPE format
├── YOLO6DPose_data/ # YOLO6DPose format
├── bop_data/ # BOP format (intermediate)
└── efficientpose_data/ # EfficientPose format