← all repositories
DIYer22/bpycv

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.

502 stars Python Data ToolingComputer Vision
bpycv
Velocity · 7d
+0.2
★ / day
Trend
steady
star history

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, and ycb_meta with 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 .obj or .dea files may need meshlabserver conversion before Blender loads them cleanly
  • The “one line code” claim is slightly generous—you still need to set up inst_id tags 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.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.