Blender as a CV data factory, with one-liner renders
Synthetic training data for instance segmentation and 6D pose estimation, without leaving Blender's Python API.

What it does
bpycv wraps Blender’s renderer into a computer-vision toolkit. You drop objects into a scene, tag them with an inst_id, and call bpycv.render_data() to get RGB, instance masks, depth maps, and 6DoF pose ground truth in one shot. It also bundles domain randomization—HDRI backgrounds, ShapeNet distractors, texture swaps—so your synthetic dataset doesn’t look like a sterile lab render.
The interesting bit
The library stays deliberately thin: no custom packaging, no hidden engine, just Blender’s native Python API with thin helpers. That means debugging is “open the Blender scripting tab and step through it,” which is rarer than you’d think in the synthetic-data world.
Key highlights
- One-liner render:
result = bpycv.render_data()returns image, instance map, depth, andycb_metawith 6D poses - Built-in domain randomization pulls from HDRI Haven, Texture Haven, and ShapeNet automatically
- Ships with a YCB demo script that is essentially a starter codebase for synthetic dataset generation
- Docker image available:
docker run -v /tmp:/tmp diyer22/bpycv - Supports Blender 2.9 through 4.x; outputs Cityscapes-compatible annotations
Caveats
- README notes that YCB/ShapeNet
.objor.deafiles may needmeshlabserverconversion before Blender loads them cleanly - The “one line code” claim is slightly generous—you still need to set up
inst_idtags and scene objects first
Verdict
Worth a look if you’re building synthetic CV datasets and want to stay inside Blender rather than duct-taping glTF exporters to external pipelines. Skip it if you need real-world data or a fully automated cloud-scale rendering farm.