Procedural Annotated Data Generation using the Blender API.
BlenderProc4BOP extends DLR-RM/BlenderProc with interfaces to the BOP datasets and provides code to generate photo-realistic training data for Object Instance Segmentation and Pose Estimation methods.
Note: This library is under active development. We are open for new contributors and happy to accept pull requests e.g. defining new modules.
The corresponding arxiv paper: https://arxiv.org/abs/1911.01911
Please refer to DLR-RM/BlenderProc for a general introduction on how to set up a data generation pipeline with a yaml config.
Using this package you can
- synthetically recreate BOP datasets
- sample and render new object poses using a variety of samplers
- use collision detection and physics to generate realistic object poses
- place objects in synthetic scenes like SunCG or real scenes like Replica
Render normals, RGB, stereo and depth. Extract class and instance segmentation labels and pose annotations. All generated data and labels are saved in compressed hdf5 files or automatically converted into COCO annotations.
You can parametrize a variety of loaders and samplers for
- object poses
- lights
- cameras
- materials
Because of the modularity of this package and the sole dependency on the Blender API, it is very simple to insert your own module. Also, any new feature introduced in Blender can be utilized here.
First make sure that you have downloaded a BOP dataset in the original folder structure. Also please clone the BOP toolkit.
We provide two example configs that interface with the BOP datasets:
- bop_scene_replication: Replicates whole scenes (object poses, camera intrinsics and extrinsics) of BOP datasets
- bop_sampling: Loads BOP objects and samples object, camera and light poses
You can create realistic synthetic data and labels by combining and parametrizing existing modules. Use the documented examples to build your own config.
Parametrize lighting.LightSampler, camera.CameraSampler, or object.ObjectPoseSampler with existing sampling functions (e.g. uniform shell, sphere or cube). Use loaders like lighting.LightLoader and camera.CameraLoader to load poses and other parameters from a file or from the config directly. Sample object poses using physics like in examples/physics_positioning. Sample objects in synthetic or real scene environments like SunCG or Replica.
Besides parametrizing existing modules, you can also create your own modules (see Writing Modules). New modules can either combine existing modules with some logic (e.g. composite/CameraObjectSampler) or create completely new functionality based on the Blender API.