pytorch-blender  by cheind

Python framework for integrating Blender into PyTorch

created 6 years ago
585 stars

Top 56.2% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This framework integrates Blender with PyTorch for generating synthetic visual data and training reinforcement learning agents. It targets researchers and engineers needing to create large, randomized datasets or custom simulation environments for deep learning tasks, offering real-time rendering via Blender's Eevee engine to accelerate model training.

How It Works

Blendtorch leverages Blender's real-time Eevee renderer to stream synthesized images and annotations directly into PyTorch data pipelines. It supports distributed rendering across multiple Blender instances and bi-directional communication, allowing simulations to adapt dynamically during training. For reinforcement learning, it provides a remote-controlled Blender environment that acts as a simulator and interactive manipulation tool.

Quick Start & Requirements

  • Installation: Clone the repository, ensure Blender is in your PATH, install Blender's Python package (blender --background --python <DST>/scripts/install_btb.py), and install PyTorch's package (pip install -e <DST>/pkg_pytorch).
  • Prerequisites: Blender >= 2.83, PyTorch >= 1.5, Python >= 3.7.
  • Optional: gym for RL tasks.
  • Resources: Requires Blender installation and a Python environment for PyTorch. Benchmarks show sub-second batch rendering times.
  • Docs: examples/datagen, examples/control

Highlighted Details

  • Real-time data generation for domain randomization and supervised learning.
  • OpenAI Gym support for reinforcement learning agents.
  • Bi-directional communication for adaptive simulations.
  • Built-in recording for replaying data without Blender.

Maintenance & Community

The project is associated with academic work, with citations provided. No specific community links (Discord, Slack) or active maintenance signals are present in the README.

Licensing & Compatibility

The README does not explicitly state a license. The code is presented for academic use, and commercial use implications are not detailed.

Limitations & Caveats

Offscreen rendering in Blender 2.8x requires a UI frontend and cannot run in --background mode. Renderings are in linear color space, appearing darker than expected when displayed directly.

Health Check
Last commit

1 year ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
5 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.