Infinigen 2.0#
Infinigen is a procedural generator of 3D scenes, developed by Princeton Vision & Learning Lab. Infinigen is optimized for computer vision and robotics research and generates diverse high-quality 3D training data. Infinigen is based on Blender and is free and open-source (BSD 3-Clause License).
Infinigen 2.0 is a top-to-bottom refactor of the system which aims to create simple and controllable APIs for all asset generators while also improving efficiency, detail, and diversity. It is built on top of procfunc, a library for composing procedural generators out of small, randomizable building blocks.
However, Infinigen 2.0 is in preview. It does not yet contain all asset types --- currently it only has new high quality indoor materials, a limited subset of indoor objects, and simple indoor room arrangements.
For instructions on using Infinigen 1.0, please see the Infinigen 1.0 Getting Started guide.
Installation#
Install uv if you don’t already have it: curl -LsSf https://astral.sh/uv/install.sh | sh
Then install Infinigen 2.0 from PyPI via the infinigen package. This requires ==2.0.0a1 or --prerelease=allow as Infinigen is currently in alpha.
uv pip install "infinigen==2.0.0a1"
or, inside a project:
uv add "infinigen==2.0.0a1"
Within a project, we recommend fixing a specific version of the alpha, as some interfaces may change gradually until we reach the 2.0 full release.
If you are modifying Infinigen itself, follow the Contributing Guide to install from cloned source code. This is not necessary for most research projects - you can follow our Example Projects to create customized data using only the documented APIs.
Examples#
You can use uv run infinigen <generator1> <generator2> ... to execute a list of functions sequentially. Each generator can be the name of a sampler function e.g. bricks_rand, or other strings like a scene template (material_cube1) or an exporter (render_cycles). Use uv run infinigen --list to see the full list. The system will chain together the inputs / outputs, e.g. using a produced material as the material keyword argument input for later steps.
Materials#
uv run infinigen bricks_rand material_torus_uv render_cycles --seed 0
uv run infinigen scratched_metal_rand material_cube render_cycles --seed 0
uv run infinigen fabric_patterned_rand material_monkey render_cycles --seed 0
Objects#
uv run infinigen sofa_rand object_demo render_cycles --seed 0
uv run infinigen lamp_rand object_demo render_cycles --seed 0
Scenes#
uv run infinigen livingroom_rand render_cycles --seed 0
uv run infinigen livingroom_rand render_cycles --seed 1
uv run infinigen livingroom_rand render_cycles --seed 2
Other examples#
Run a render with ground truth annotations:
uv run infinigen bricks_rand material_torus_uv render_cycles render_cycles_ground_truth visualize_gt --passes rgb surface-normal depth
Run many renders locally (increase -P to run more in parallel! warning - may crash your laptop):
seq 4 | xargs -P 1 -t -I{} uv run --no-sync python -m infinigen2.generate bricks_rand material_torus_uv render_cycles --seed {} --output outputs/bricks/{} --quiet | ./scripts/image-grid.py 4x render.png -o
Execute materials on different sizes / shapes of base objects.
uv run infinigen bricks_rand material_sphere render_cycles
uv run infinigen bricks_rand material_monkey render_cycles
uv run infinigen bricks_rand material_torus_uv render_cycles
uv run infinigen bricks_rand material_plane_uv render_cycles
uv run infinigen bricks_rand material_banana render_cycles
Trace execution to generate code or compute stats:
uv run infinigen bricks_rand material_torus_uv render_cycles --trace codegen
uv run infinigen bricks_rand --trace codestats
uv run infinigen bricks_rand --trace codegen codestats # both on one graph
uv run infinigen bricks_rand --trace codestats --trace_level RANDOM_CONTROL # finer granularity
See the Contributing Guide for the full development workflow, including how to transpile Blender node graphs into procfunc generators.
Infinigen 2.0 Preview
Infinigen 1.0
Infinigen 1.0 Nature
Infinigen 1.0 Indoors