Create your own synthetic dataset for object detection.
This repo creates random scenes on blender, imports custom 3D models with randomised configurations, and renders numerous images with annotations to train an object detection model.
- Follow installation instructions here
- Add blender to PATH
echo 'export PATH=/path/to/blender/directory:$PATH' >> ~/.bashrc
- Ensure your GPU is supported on blender. Refer here
git clone https://github.com/wish2023/blender-synthetics.git
sh install_requirements.sh
- Update
config/models.yaml
andconfig/render_parameters.yaml
as required. Refer to models and render parameters for details. - Generate images
blender -b -P src/render_blender.py
- Generate annotations
python3 src/create_labels.py
Currently supports fbx/obj/blend. Ensure your models only contain one object that has the same name as its filename.
Your targets of interest. Bounding boxes will be drawn around these objects.
Other objects which will be present in the scene. These won't be annotated.
Textures that your scene may have. Explore possible textures from texture haven and store all texture subfolders in a main folder.
When not occlusion aware, bounding boxes will surround regions of the object that aren't visible by the camera.
The fraction of an object that must be visible by the camera for it to be considered visible to a human annotator.
The fraction of an object components that must be visible by the camera for it to be considered visible to a human annotator.
The sun's energy is the light intensity on the scene. The tilt is responsible for casting shadows and works similar to the camera's tilt.