infinigen-room-layout-env is a Blender-free research repository for indoor
layout generation. It extracts the part of the problem that many layout papers
actually need for algorithm development:
- a sequential placement environment for RL and search
- a static validator for user-specified room layouts
- an Infinigen-inspired room catalog for
bedroom,living_room, andkitchen - a procedural room sampler that can generate an unbounded stream of numerical room instances without rendering, mesh generation, or Blender
The repository is intended for studying coarse indoor layout generation in a clean numerical setting where the algorithm decides what to place and where to place it, while the environment judges feasibility and constraint satisfaction.
Modern indoor scene pipelines often entangle several layers at once:
- room generation
- furniture selection
- geometric layout
- asset instantiation
- Blender execution
- rendering and post-processing
That makes it difficult to evaluate whether a layout policy itself is good. This repository isolates the layout layer so you can benchmark:
- reinforcement-learning policies
- search and optimization methods
- object-subset selection algorithms
- hybrid planners that mix learned proposals with explicit checking
SequentialLayoutEnvfor interactivereset()/step()placementStaticLayoutValidatorfor full-scene validation of user-provided placements- Infinigen-inspired object roles and room-specific constraints
- Parameterized room schemas with variable room dimensions
- Procedural room profiles with random doors, windows, and room options
- Infinite room-instance streams for large-scale layout benchmarking
- CPU-friendly toy baselines for GA and actor-critic experiments
- Unit tests and GitHub Actions CI for reproducible setup
git clone https://github.com/Michael-YuQ/infinigen-room-layout-env.git
cd infinigen-room-layout-env
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e .python -m pip install -e ".[torch]"Run the test suite on a clean machine:
python -m unittest discover -s tests -vThe repository is designed so that the geometry layer, validator, procedural sampler, and tests run without Blender, without the original Infinigen codebase, and without a GPU.
python examples/demo_static_layout.pypython examples/demo_env.pypython examples/demo_ga.pypython examples/demo_procedural_rooms.pyThis example requires PyTorch.
python examples/demo_model_forward.pypython examples/train_actor_critic.py \
--task home_office \
--episodes 500 \
--device cpu \
--outdir runs/home_office_acOne of the main goals of the current release is to support effectively infinite room generation in a purely numerical benchmark.
The procedural sampler varies:
- room width and height
- aspect ratio
- room-level options such as
has_tvandhas_kitchen_barstools - door and window placement along sampled walls
It does not decide the furniture subset or the final placement. That remains the responsibility of your algorithm.
from infinigen_layout_env import StaticLayoutValidator, sample_room_instance
instance = sample_room_instance("living_room_open", seed=123)
validator = StaticLayoutValidator(instance.schema, features=instance.features)
print(instance.instance_id)
print(instance.schema.room_width, instance.schema.room_height)
print(instance.sampled_options)
print([feature.to_dict() for feature in instance.features])For an infinite stream of room instances:
from infinigen_layout_env import iter_room_instances
sampler = iter_room_instances("bedroom_compact", seed=7)
first = next(sampler)
second = next(sampler)from infinigen_layout_env import build_living_room_schema
from infinigen_layout_env import StaticLayoutValidator, StaticPlacement
schema = build_living_room_schema(has_tv=True)
validator = StaticLayoutValidator(schema)
report = validator.validate(
[
StaticPlacement(
instance_id="sofa_1",
object_type="sofa",
support_id="room::floor",
center_x=3.1,
center_y=0.475,
rotation=0,
),
]
)
print(report.valid)
print(report.errors)from infinigen_layout_env import PlacementAction, SequentialLayoutEnv
from infinigen_layout_env.tasks import build_home_office_task
env = SequentialLayoutEnv(build_home_office_task())
observation, info = env.reset()
observation, reward, terminated, truncated, info = env.step(
PlacementAction(
item_id="desk",
support_id="room::floor",
u=0.14,
v=0.5,
rotation=0,
)
)infinigen_layout_env/environment.py- sequential placement environment
infinigen_layout_env/static_layout.py- full-scene static validator
infinigen_layout_env/room_catalog.py- Infinigen-inspired room schemas and object catalog
infinigen_layout_env/procedural_rooms.py- parameterized room profiles and infinite room-instance sampling
infinigen_layout_env/constraints.py- low-level sequential placement constraint checker
infinigen_layout_env/ga.py- lightweight evolutionary baseline
infinigen_layout_env/models/- pointer-style actor-critic model skeleton
examples/- runnable examples
tests/- unit tests for environment, validator, and procedural sampling
docs/- extracted constraint notes and release notes
This repository intentionally stays at the coarse-layout level.
What it models well:
- support compatibility
- wall-adjacent placement requirements
- in-bounds checks
- support-surface placement on desks, counters, and storage units
- room-level count rules
- simple wall-feature conflicts
- programmatic generation of room-size and room-feature variants
What it does not yet fully model:
- mesh-level geometry
- full Infinigen accessibility fields
- cutter and traversal graphs
- photorealistic asset diversity
- multi-room house graphs
The current public release is v0.2.0, which adds:
- a static validator for Infinigen-inspired room schemas
- sampled room dimensions in
build_room_schema - procedural room profiles and infinite room-instance iterators
- sampled door and window features
- relaxed office-chair validation to better match Infinigen desk semantics
- CI-backed reproducibility on Python 3.10, 3.11, and 3.12
Detailed notes are available in docs/releases/v0.2.0.md.
If this repository is useful in your research, please cite the repository URL and describe the benchmark setting you used, including:
- room profile
- random seed policy
- whether object selection was learned or fixed
- whether validation used sampled room features
- whether the task used sequential placement or full-scene static validation