### Normal Infinigen Installation Source: https://github.com/princeton-vl/infinigen/blob/main/docs/Installation.md Execute this command for a standard installation of Infinigen. This installs all core functionalities. ```bash bash scripts/install/interactive_blender.sh ``` -------------------------------- ### Minimal Infinigen Installation Source: https://github.com/princeton-vl/infinigen/blob/main/docs/Installation.md Use this command for a minimal installation, recommended for use within the Blender UI. It installs the necessary components without extra features. ```bash INFINIGEN_MINIMAL_INSTALL=True bash scripts/install/interactive_blender.sh ``` -------------------------------- ### Install Infinigen - Simulation Assets Source: https://github.com/princeton-vl/infinigen/blob/main/docs/Installation.md Installs Infinigen with support for generating simulation assets. ```bash # Installation for simulation assets pip install -e ".[sim]" ``` -------------------------------- ### Install Infinigen with Simulation Support Source: https://github.com/princeton-vl/infinigen/blob/main/docs/simulation/ExportingToSimulators.md Install Infinigen with the necessary dependencies for simulation by running this pip command. ```bash pip install -e ".[sim"] ``` -------------------------------- ### Install Infinigen - Full Source: https://github.com/princeton-vl/infinigen/blob/main/docs/Installation.md Installs Infinigen with full support for terrain generation and OpenGL ground truth data, required for the Hello World demo. ```bash # Full install (Terrain & OpenGL-GT enabled, needed for Infinigen-Nature HelloWorld) pip install -e ".[terrain,vis]" ``` -------------------------------- ### Install Linux Dependencies Source: https://github.com/princeton-vl/infinigen/blob/main/docs/Installation.md Installs essential development libraries for Infinigen on Ubuntu, Debian, or WSL systems. ```bash # on Ubuntu / Debian / WSL / etc sudo apt-get install wget cmake g++ libgles2-mesa-dev libglew-dev libglfw3-dev libglm-dev zlib1g-dev ``` -------------------------------- ### Troubleshooting Installation Issues Source: https://github.com/princeton-vl/infinigen/blob/main/docs/Installation.md If installation fails, append ' > logs.txt 2>&1' to your command to capture detailed logs. Provide these logs when reporting issues on Github. ```bash > logs.txt 2>&1 ``` -------------------------------- ### Install Dependencies Source: https://github.com/princeton-vl/infinigen/blob/main/infinigen/tools/terrain/palette/readme.md Install the required Python packages for the palette generation tool. ```bash pip install google-images-search==1.4.4 json5 ``` -------------------------------- ### Install Infinigen - Minimal Source: https://github.com/princeton-vl/infinigen/blob/main/docs/Installation.md Installs the minimal version of Infinigen, suitable for object generation without terrain or OpenGL ground truth data. ```bash # Minimal install (No terrain or opengl GT, ok for Infinigen-Indoors or single-object generation) INFINIGEN_MINIMAL_INSTALL=True pip install -e . ``` -------------------------------- ### Install Infinigen - Developer Source: https://github.com/princeton-vl/infinigen/blob/main/docs/Installation.md Installs Infinigen with development tools like pytest and ruff, along with terrain and visualization support. ```bash # Developer install (includes pytest, ruff, other recommended dev tools) pip install -e ".[dev,terrain,vis]" pre-commit install ``` -------------------------------- ### Run Optical Flow Warp Example Source: https://github.com/princeton-vl/infinigen/blob/main/docs/GroundTruthAnnotations.md Use this command to see an example of how optical flow can be used to warp one frame to the next. Ensure you have the necessary Python environment set up. ```bash python -m infinigen.tools.ground_truth.optical_flow_warp ``` -------------------------------- ### Docker Setup for Infinigen on Linux Source: https://github.com/princeton-vl/infinigen/blob/main/docs/Installation.md Prepare the Docker environment for Infinigen on Linux. This step is necessary for running containerized scenes and may be skipped if not using OpenGL. ```bash make docker-setup ``` -------------------------------- ### Install Mac x86_64 Dependencies Source: https://github.com/princeton-vl/infinigen/blob/main/docs/Installation.md Installs required packages for Infinigen on Mac systems with Intel x86_64 architecture. ```bash # on Mac x86_64 (Intel) brew install wget cmake llvm open-mpi libomp glm glew zlib ``` -------------------------------- ### Infinigen Installation with OpenGL GT Enabled Source: https://github.com/princeton-vl/infinigen/blob/main/docs/Installation.md This command enables OpenGL Ground Truth (GT) during installation. Use this if your workflow requires OpenGL GT features. ```bash INFINIGEN_INSTALL_CUSTOMGT=True bash scripts/install/interactive_blender.sh ``` -------------------------------- ### Load Custom Gin Configuration Source: https://github.com/princeton-vl/infinigen/blob/main/docs/ConfiguringInfinigen.md Place custom overrides in a `.gin` file and load it using the `--configs` argument. This example assumes the config file is in `infinigen_examples/configs`. ```bash python -m infinigen_examples.generate_nature --configs my_custom_config.gin ``` -------------------------------- ### Install Visualization Dependencies Source: https://github.com/princeton-vl/infinigen/blob/main/docs/GroundTruthAnnotations.md Installs necessary dependencies for running visualization scripts. Use this command when visualization features are required. ```bash pip install ".[vis]" ``` -------------------------------- ### Create High-Quality Videos Source: https://github.com/princeton-vl/infinigen/blob/main/docs/ConfiguringInfinigen.md Use this command as a starting point for generating high-quality videos. Ensure CUDA acceleration is set up for multi-view consistent terrain generation. ```bash python -m infinigen.datagen.manage_jobs --output_folder outputs/my_videos --num_scenes 500 \ --pipeline_config slurm monocular_video cuda_terrain opengl_gt \ --cleanup big_files --warmup_sec 60000 --config trailer_video high_quality_terrain \ -p fine_terrain.mesher_backend="OcMesher" ``` -------------------------------- ### Launching Infinigen Blender UI Source: https://github.com/princeton-vl/infinigen/blob/main/docs/Installation.md After installation, use this script to launch the Blender UI. It automatically finds the 'blender' executable within your Infinigen directory. ```python python -m infinigen.launch_blender ``` -------------------------------- ### Install Mac ARM Dependencies Source: https://github.com/princeton-vl/infinigen/blob/main/docs/Installation.md Installs necessary tools and libraries for Infinigen on Mac systems with ARM architecture (M1/M2/...). ```bash # on an Mac ARM (M1/M2/...) arch -arm64 brew install wget cmake llvm open-mpi libomp glm glew zlib ``` -------------------------------- ### Install Terrain and Generate Coarse Indoor Scene Source: https://github.com/princeton-vl/infinigen/blob/main/docs/HelloRoom.md Installs the terrain submodule and generates a coarse indoor scene with specific configurations for terrain, room restrictions, and solving small elements. ```bash # install terrain git submodule update pip install -e .[terrain] python -m infinigen_examples.generate_indoors -- --output_folder outputs/indoors/coarse --seed 0 --task coarse -g forest singleroom real_geometry_with_bump -p compose_indoors.terrain_enabled=True restrict_solving.restrict_parent_rooms=\["DiningRoom"\] compose_indoors.solve_small_enabled=False ``` -------------------------------- ### Install OpenGL Dependencies on Ubuntu Source: https://github.com/princeton-vl/infinigen/blob/main/docs/GroundTruthAnnotations.md Installs required libraries for OpenGL-based annotations on Ubuntu systems. This is a prerequisite for the advanced annotation pipeline. ```bash sudo apt-get install libglm-dev libglew-dev libglfw3-dev libgles2-mesa-dev zlib1g-dev ``` -------------------------------- ### Docker Run for Infinigen on Linux Source: https://github.com/princeton-vl/infinigen/blob/main/docs/Installation.md Start the Infinigen Docker container on Linux. This command launches the environment where you can run Infinigen scenes. ```bash make docker-run ``` -------------------------------- ### Create Static Asset Directories Source: https://github.com/princeton-vl/infinigen/blob/main/docs/StaticAssets.md Create the necessary directory structure for organizing static assets within the Infinigen project. This setup allows for categorization and easy management of imported 3D models. ```bash mkdir infinigen/assets/static_assets/source mkdir infinigen/assets/static_assets/source/Shelf mkdir infinigen/assets/static_assets/source/Sofa mkdir infinigen/assets/static_assets/source/Table ``` -------------------------------- ### Import Scene and Run Simulation in IsaacSim Source: https://github.com/princeton-vl/infinigen/blob/main/docs/ExportingToSimulators.md Run this command to import an exported Infinigen scene into IsaacSim and start a simulation. Ensure the correct paths to the scene file and solve state JSON are provided. ```bash python {PATH_TO/isaac_sim.py} --scene-path outputs/my_export/export_scene.blend/export_scene.usdc --json-path outputs/my_export/export_scene.blend/solve_state.json ``` -------------------------------- ### Install Conda Dependencies and Set Paths Source: https://github.com/princeton-vl/infinigen/blob/main/docs/Installation.md Installs dependencies using Conda and configures environment variables for include and library paths. Useful when sudo permissions are unavailable. ```bash # on Conda. Useful when you don't have sudo permissions conda install conda-forge::gxx=11.4.0 mesalib glew glm menpo::glfw3 export C_INCLUDE_PATH=$CONDA_PREFIX/include:$C_INCLUDE_PATH export CPLUS_INCLUDE_PATH=$CONDA_PREFIX/include:$CPLUS_INCLU export LIBRARY_PATH=$CONDA_PREFIX/lib:$LIBRARY_PATH export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH ``` -------------------------------- ### Set up IsaacSim Conda Environment Source: https://github.com/princeton-vl/infinigen/blob/main/docs/ExportingToSimulators.md Commands to create and activate a conda environment for NVIDIA IsaacSim. These commands should be run within the IsaacSim installation directory. ```bash conda env create -f environment.yml ``` ```bash conda activate isaac-sim ``` ```bash source setup_conda_env.sh ``` -------------------------------- ### Asset Factory with Transpiled Geometry Nodes Source: https://github.com/princeton-vl/infinigen/blob/main/docs/ImplementingAssets.md This example shows how to implement `create_asset` using transpiled code from a geometry node graph. It spawns a dummy object and applies the transpiled code to it. ```python from infinigen.core.util import blender as butil ... def apply(obj): # code from the transpiler ... class MyAssetFactory(AssetFactory): ... def create_asset(self, **kwargs): obj = butil.spawn_vert() # dummy empty object to apply on apply(obj) return obj ``` -------------------------------- ### Generate Multiple Instances of Articulated Assets Source: https://github.com/princeton-vl/infinigen/blob/main/docs/ExportingToSimulators.md Example commands to generate 10 instances of various articulated assets (door, dishwasher, lamp, etc.) in MJCF format. ```bash ./scripts/spawn_sim_ready_asset.sh door 10 mjcf ``` ```bash ./scripts/spawn_sim_ready_asset.sh dishwasher 10 mjcf ``` ```bash ./scripts/spawn_sim_ready_asset.sh lamp 10 mjcf ``` ```bash ./scripts/spawn_sim_ready_asset.sh multifridge 10 mjcf ``` ```bash ./scripts/spawn_sim_ready_asset.sh multidoublefridge 10 mjcf ``` ```bash ./scripts/spawn_sim_ready_asset.sh toaster 10 mjcf ``` -------------------------------- ### Install OpenGL Dependencies on MacOS Source: https://github.com/princeton-vl/infinigen/blob/main/docs/GroundTruthAnnotations.md Installs required libraries for OpenGL-based annotations on MacOS using Homebrew. ```bash brew install glfw3 brew install glew ``` -------------------------------- ### Install OpenGL Dependencies on WSL Source: https://github.com/princeton-vl/infinigen/blob/main/docs/GroundTruthAnnotations.md Installs additional dependencies required for compiling OpenGL features on Windows Subsystem for Linux (WSL). ```bash sudo apt-get install doxygen sudo apt-get install libxinerama-dev sudo apt-get install libxcursor-dev sudo apt-get install libxi-dev ``` -------------------------------- ### Generate Indoors with Floor Plan (JSON) Source: https://github.com/princeton-vl/infinigen/blob/main/docs/HelloRoom.md Use this command to generate indoor environments with furniture placement based on a JSON floor plan. Ensure the 'Solver.floor_plan' path points to your predefined JSON file. ```bash python -m infinigen_examples.generate_indoors --seed 0 --task coarse --output_folder outputs/indoors_real/coarse -g singleroom.gin fast_solve.gin no_objects.gin -p compose_indoors.terrain_enabled=False Solver.floor_plan='infinigen_examples/configs_indoor/floor_plans/predefined.json' ``` -------------------------------- ### Create and Export Infinigen Indoor Scenes Source: https://github.com/princeton-vl/infinigen/blob/main/docs/ExportingToSimulators.md Commands to generate an indoor scene and export it to USD format for use in robotics simulators. The first command generates the scene, and the second exports it. ```bash python -m infinigen_examples.generate_indoors --seed 0 --task coarse --output_folder outputs/indoors/coarse -g overhead_singleroom.gin -p compose_indoors.terrain_enabled=False restrict_solving.solve_max_rooms=1 ``` ```bash python -m infinigen.tools.export --input_folder outputs/indoors/coarse --output_folder outputs/my_export -f usdc -r 1024 --omniverse ``` -------------------------------- ### Generate Indoor Scene with 5 Multiview Cameras Source: https://github.com/princeton-vl/infinigen/blob/main/docs/ConfiguringCameras.md Creates a test indoor scene with 5 multiview cameras, suitable for MVS or NeRF. It uses specific configurations for fast solving and no objects. ```bash python -m infinigen.datagen.manage_jobs --output_folder outputs/mvs_test --num_scenes 1 --configs multiview_stereo.gin fast_solve.gin no_objects.gin --pipeline_configs local_256GB.gin monocular.gin blender_gt.gin cuda_terrain.gin indoor_background_configs.gin --overrides camera.spawn_camera_rigs.n_camera_rigs=5 compose_nature.animate_cameras_enabled=False compose_indoors.restrict_single_supported_roomtype=True --pipeline_overrides get_cmd.driver_script='infinigen_examples.generate_indoors' iterate_scene_tasks.n_camera_rigs=5 ``` -------------------------------- ### Generated Surface Script for Snow Example Source: https://github.com/princeton-vl/infinigen/blob/main/docs/ImplementingAssets.md This script is generated by the Node Transpiler for a snow material example. It defines both the shader material and geometry nodes for the asset. ```python import bpy import bpy import mathutils from numpy.random import uniform, normal, randint from infinigen.core.nodes.node_wrangler import Nodes, NodeWrangler from infinigen.core.nodes import node_utils from infinigen import core def shader_material(nw: NodeWrangler): # Code generated using version 2.6.4 of the node_transpiler principled_bsdf = nw.new_node(Nodes.PrincipledBSDF, input_kwargs={'Base Color': (0.5004, 0.5149, 0.6913, 1.0000), 'Subsurface Radius': (0.0500, 0.1000, 0.1000), 'Roughness': 0.1182}) material_output = nw.new_node(Nodes.MaterialOutput, input_kwargs={'Surface': principled_bsdf}, attrs={'is_active_output': True}) def geometry_nodes(nw: NodeWrangler): # Code generated using version 2.6.4 of the node_transpiler group_input = nw.new_node(Nodes.GroupInput, expose_input=[('NodeSocketGeometry', 'Geometry', None)]) normal = nw.new_node(Nodes.InputNormal) noise_texture = nw.new_node(Nodes.NoiseTexture, input_kwargs={'Scale': 2.6600, 'Detail': 0.8000, 'Roughness': 1.0000}) multiply = nw.new_node(Nodes.Math, input_kwargs={0: noise_texture.outputs["Fac"], 1: 0.1300}, attrs={'operation': 'MULTIPLY'}) noise_texture_1 = nw.new_node(Nodes.NoiseTexture, input_kwargs={'Scale': 100.0000, 'Detail': 15.0000, 'Roughness': 1.0000}) multiply_1 = nw.new_node(Nodes.Math, input_kwargs={0: noise_texture_1.outputs["Fac"], 1: 0.0150}, attrs={'operation': 'MULTIPLY'}) add = nw.new_node(Nodes.Math, input_kwargs={0: multiply, 1: multiply_1}) scale = nw.new_node(Nodes.VectorMath, input_kwargs={0: normal, 'Scale': add}, attrs={'operation': 'SCALE'}) set_position = nw.new_node(Nodes.SetPosition, input_kwargs={'Geometry': group_input.outputs["Geometry"], 'Offset': scale.outputs["Vector"]}) group_output = nw.new_node(Nodes.GroupOutput, input_kwargs={'Geometry': set_position}, attrs={'is_active_output': True}) def apply(obj, selection=None, **kwargs): surface.add_geomod(obj, geometry_nodes, selection=selection, attributes=[]) surface.add_material(obj, shader_material, selection=selection) apply(bpy.context.active_object) ``` -------------------------------- ### Launch Infinigen Blender Environment Source: https://github.com/princeton-vl/infinigen/blob/main/docs/ImplementingAssets.md Use this command to open a standalone Blender instance pre-configured for Infinigen development. This is essential for interactive asset creation and debugging. ```bash python -m infinigen.launch_blender dev_scene.blend ``` -------------------------------- ### Generate Initial Palette Source: https://github.com/princeton-vl/infinigen/blob/main/infinigen/tools/terrain/palette/readme.md Navigate to the palette tool directory and run the script with a keyword to download images and generate an initial color palette. ```bash cd infinigen/tools/terrain/palette/ # you can change "mountain rock" to other key words python palette.py -k "mountain rock" ``` -------------------------------- ### Clone Repository and Set Up Conda Environment Source: https://github.com/princeton-vl/infinigen/blob/main/docs/Installation.md Downloads the Infinigen repository and creates/activates a dedicated conda environment for Python 3.11. ```bash git clone https://github.com/princeton-vl/infinigen.git cd infinigen git submodule update --init conda create --name infinigen python=3.11 conda activate infinigen ``` -------------------------------- ### Compile OpenGL Dependencies Source: https://github.com/princeton-vl/infinigen/blob/main/docs/GroundTruthAnnotations.md Compiles the OpenGL-related dependencies after system libraries have been installed. This is a crucial step for the advanced annotation pipeline. ```bash bash scripts/install/compile_opengl.sh ``` -------------------------------- ### Import Necessary Libraries Source: https://github.com/princeton-vl/infinigen/blob/main/infinigen/tools/perceptual/analysis.ipynb Imports essential libraries for data manipulation, numerical operations, and plotting. Ensure these are installed before running scripts. ```python # Copyright (C) 2023, Princeton University. # This source code is licensed under the BSD 3-Clause license found in the LICENSE file in the root directory of this source tree. ``` -------------------------------- ### Run Basic Infinigen Scene Generation Source: https://github.com/princeton-vl/infinigen/blob/main/docs/ConfiguringInfinigen.md This command generates a single desert scene with low detail using specified configurations and disables GPU usage for broader compatibility. ```bash python -m infinigen.datagen.manage_jobs --output_folder outputs/hello_world --num_scenes 1 --specific_seed 0 \ --configs desert.gin simple.gin --pipeline_configs local_16GB.gin monocular.gin blender_gt.gin \ --pipeline_overrides LocalScheduleHandler.use_gpu=False ``` -------------------------------- ### Apply Grassland Scatter Source: https://github.com/princeton-vl/infinigen/blob/main/docs/ImplementingAssets.md This example demonstrates how to import and apply a specific scatter generator, like the grassland scatter, to a selected object in Blender. ```python from infinigen.assets.scatters import grass grass.apply(bpy.context.active_object) ``` -------------------------------- ### Define Object Semantics Source: https://github.com/princeton-vl/infinigen/blob/main/docs/StaticAssets.md Define the semantic meaning for objects in your new category. This example shows how to associate `Semantics.Furniture` with your custom static assets. ```python used_as[Semantics.Furniture] = {...static_assets.StaticMyCategoryFactory} ``` -------------------------------- ### Analyze Infinigen vs. ATISS Overhead Layout Realism Source: https://github.com/princeton-vl/infinigen/blob/main/infinigen/tools/perceptual/analysis.ipynb Compares Infinigen's overhead layout realism against ATISS using a CSV file. Prints the proportion and 99% confidence interval. ```python src = './results/infinigen-ATISS-overhead-layout-realism.csv' df = pd.read_csv(src) print(f'Infinigen overhead layout is more realistic than ATISS {A_count_proportion(df)[0]:.3f} of the time. 99% confidence interval: {A_count_proportion(df)[1]:.3f} - {A_count_proportion(df)[2]:.3f}') ``` -------------------------------- ### Generate Dynamic Nature Videos with RRT* Source: https://github.com/princeton-vl/infinigen/blob/main/docs/ConfiguringCameras.md Creates nature videos with dynamic and interesting camera motion using RRT* for camera path generation. Includes warmup, cleanup, and overwrite options. ```bash python -m infinigen.datagen.manage_jobs --output_folder outputs/video_dynamic_nature --num_scenes 30 --configs high_quality_terrain.gin rrt_cam_nature.gin --pipeline_configs local_256GB.gin blender_gt.gin monocular_video --pipeline_overrides manage_datagen_jobs.num_concurrent=15 iterate_scene_tasks.cam_block_size=24 iterate_scene_tasks.frame_range=[1,200] --overrides fine_terrain.mesher_backend=OcMesher --warmup_sec 2000 --cleanup big_files --overwrite ``` -------------------------------- ### Generate Hello-World Scene with Advanced Annotations Source: https://github.com/princeton-vl/infinigen/blob/main/docs/GroundTruthAnnotations.md Generates the hello-world scene using the custom advanced annotation system. This command utilizes the 'opengl_gt.gin' pipeline configuration. ```python python -m infinigen.datagen.manage_jobs --output_folder outputs/hello_world/0 --num_scenes 1 --specific_seed 0 \ --configs desert.gin simple.gin --pipeline_configs local_16GB.gin monocular.gin opengl_gt.gin --pipeline_overrides LocalScheduleHandler.use_gpu=False ``` -------------------------------- ### Define Object Constraints Source: https://github.com/princeton-vl/infinigen/blob/main/docs/StaticAssets.md Define constraints for your custom static objects, such as their placement relative to walls. This example shows how to use `wallfurn` for a custom category. ```python my_cat_against_wall = wallfurn[static_assets.StaticMyCategoryFactory] ``` -------------------------------- ### Generate Dynamic Indoor Videos with RRT* Source: https://github.com/princeton-vl/infinigen/blob/main/docs/ConfiguringCameras.md Generates indoor videos with dynamic camera motion using RRT* and specific indoor configurations. Includes overrides for view computation and indoor composition. ```bash python -m infinigen.datagen.manage_jobs --output_folder outputs/video_dynamic_indoor --num_scenes 30 \ --configs singleroom.gin rrt_cam_indoors.gin \ --pipeline_configs local_256GB.gin indoor_background_configs.gin monocular_video \ --overrides compute_base_views.min_candidates_ratio=2 compose_indoors.terrain_enabled=False compose_indoors.restrict_single_supported_roomtype=True \ --pipeline_overrides get_cmd.driver_script='infinigen_examples.generate_indoors' iterate_scene_tasks.frame_range=[1,200] \ --warmup_sec 2000 --cleanup big_files --overwrite ``` -------------------------------- ### Generate Nature Dataset with 30 Multiview Cameras Source: https://github.com/princeton-vl/infinigen/blob/main/docs/ConfiguringCameras.md Creates a dataset of nature scenes, each equipped with 30 multiview cameras. This configuration is optimized for multiview stereo tasks. ```bash python -m infinigen.datagen.manage_jobs --output_folder outputs/mvs_nature --num_scenes 30 --configs multiview_stereo.gin --pipeline_configs local_256GB.gin monocular.gin blender_gt.gin cuda_terrain.gin --overrides camera.spawn_camera_rigs.n_camera_rigs=30 compose_nature.animate_cameras_enabled=False --pipeline_overrides iterate_scene_tasks.n_camera_rigs=30 ``` -------------------------------- ### Launching Module Commands in Standalone Blender Source: https://github.com/princeton-vl/infinigen/blob/main/docs/Installation.md When using Infinigen as a Blender-Python script, run module commands using this format to ensure they launch with your standalone Blender installation. ```python python -m infinigen.launch_blender -m -- ``` -------------------------------- ### Generate Indoor Dataset with 30 Multiview Cameras Source: https://github.com/princeton-vl/infinigen/blob/main/docs/ConfiguringCameras.md Generates a dataset of indoor rooms, each with 30 multiview cameras. This is useful for training models that require dense multi-view input. ```bash python -m infinigen.datagen.manage_jobs --output_folder outputs/mvs_indoors --num_scenes 30 --pipeline_configs local_256GB.gin monocular.gin blender_gt.gin indoor_background_configs.gin --configs singleroom.gin multiview_stereo.gin --pipeline_overrides get_cmd.driver_script='infinigen_examples.generate_indoors' iterate_scene_tasks.n_camera_rigs=30 --overrides compose_indoors.restrict_single_supported_roomtype=True camera.spawn_camera_rigs.n_camera_rigs=30 ``` -------------------------------- ### Hinge Joint Example Source: https://github.com/princeton-vl/infinigen/blob/main/docs/simulation/UsingJointNodes.md Connects two geometries via a hinge joint, defining a parent-child relationship and allowing for rotation around a specified axis with optional limits. ```python import bpy from infinigen.core.nodes.node_wrangler import Nodes, WR def hinge_joint(): # Define parent and child geometries parent_geom = WR.geometry_node_group_inputs("Parent") child_geom = WR.geometry_node_group_inputs("Child") # Create a Hinge Joint node hinge_node = WR.create_node(Nodes.JOINT_HINGE) # Connect geometries to the Hinge Joint node WR.connect_nodes(parent_geom, hinge_node.inputs["Parent"]) WR.connect_nodes(child_geom, hinge_node.inputs["Child"]) # Set joint parameters (example values) hinge_node.inputs["Joint Label"].value = "door_hinge" hinge_node.inputs["Position"].value = (0.0, 1.0, 0.0) # Example position hinge_node.inputs["Axis"].value = (0.0, 0.0, 1.0) # Example axis hinge_node.inputs["Value"].value = 0.0 # Initial rotation hinge_node.inputs["Min"].value = -1.57 # -90 degrees hinge_node.inputs["Max"].value = 1.57 # 90 degrees # Output the resulting geometry WR.set_output("Geometry", hinge_node.outputs["Geometry"]) WR.set_output("Parent", hinge_node.outputs["Parent"]) WR.set_output("Child", hinge_node.outputs["Child"]) return ``` -------------------------------- ### Analyze Infinigen vs. FastSynth Layout Realism Source: https://github.com/princeton-vl/infinigen/blob/main/infinigen/tools/perceptual/analysis.ipynb Compares Infinigen's first-person layout realism against FastSynth using a CSV file. Prints the proportion and 99% confidence interval. ```python src = './results/infinigen-fastsynth-first-person-layout-realism.csv' df = pd.read_csv(src) print(f'Infinigen first person layout is more realistic than FastSynth {A_count_proportion(df)[0]:.3f} of the time. 99% confidence interval: {A_count_proportion(df)[1]:.3f} - {A_count_proportion(df)[2]:.3f}') ``` -------------------------------- ### Launch Blender to Inspect Scene Source: https://github.com/princeton-vl/infinigen/blob/main/docs/HelloRoom.md Opens the generated scene file in Blender for inspection. This command requires Blender to be installed and configured as a Python script. It allows you to view and interact with the 3D model. ```bash python -m infinigen.launch_blender outputs/indoors/coarse/scene.blend ``` -------------------------------- ### Analyze Infinigen vs. ATISS Overhead Realism Source: https://github.com/princeton-vl/infinigen/blob/main/infinigen/tools/perceptual/analysis.ipynb Compares Infinigen's overhead realism against ATISS using a CSV file. Prints the proportion and 99% confidence interval. ```python src = './results/infinigen-ATISS-overhead-realism.csv' df = pd.read_csv(src) print(f'Infinigen overhead is more realistic than ATISS {A_count_proportion(df)[0]:.3f} of the time. 99% confidence interval: {A_count_proportion(df)[1]:.3f} - {A_count_proportion(df)[2]:.3f}') ``` -------------------------------- ### Basic MuJoCo Visualization Source: https://github.com/princeton-vl/infinigen/blob/main/docs/simulation/VisualizingArticulatedAssets.md Run this command from the root of the repository to generate assets, export them to XML, render joint animations, and create an HTML file for viewing. It processes a specified number of seeds sequentially. ```bash python infinigen/tools/sim/visualizer.py --asset_name door --nr 3 ``` -------------------------------- ### Pre-generate All Fire Asset Types Source: https://github.com/princeton-vl/infinigen/blob/main/docs/GeneratingFluidSimulations.md Pre-generates fire assets for various types (bush, tree, creature, cactus, boulder) and saves them to a specified folder. The number of assets, start frame, and duration can be adjusted. ```bash python -m infinigen.launch_blender -m infinigen.tools.submit_asset_cache -- -f {fire_asset_folder} -n 1 -s -40 -d 184 ``` -------------------------------- ### Generate Indoors with Floor Plan (Python Module) Source: https://github.com/princeton-vl/infinigen/blob/main/docs/HelloRoom.md This command generates indoor environments using a Python module path for the floor plan configuration. It allows for dynamic floor plan definitions. ```bash python -m infinigen_examples.generate_indoors --seed 0 --task coarse --output_folder outputs/indoors_real/coarse -g singleroom.gin fast_solve.gin no_objects.gin -p compose_indoors.terrain_enabled=False Solver.floor_plan='infinigen_examples.configs_indoor.floor_plans.predefined.example' ``` -------------------------------- ### Pre-generate Specific Fire Asset Type Source: https://github.com/princeton-vl/infinigen/blob/main/docs/GeneratingFluidSimulations.md Pre-generates a single type of fire asset (e.g., bush, tree) and saves it to a specified folder. Requires specifying the asset type, start frame, and simulation duration. ```bash python -m infinigen.launch_blender -m infinigen.assets.fluid.run_asset_cache -- -f {fire_asset_folder} -a {asset} -s {start_frame} -d {simulation_duration} ``` -------------------------------- ### Docker Build for Infinigen on Linux Source: https://github.com/princeton-vl/infinigen/blob/main/docs/Installation.md Clone the Infinigen repository and build the Docker image for Linux. This command sets up the environment for containerized use. ```bash git clone https://github.com/princeton-vl/infinigen.git cd infinigen make docker-build ``` -------------------------------- ### Use Palette Keyword in Configuration Source: https://github.com/princeton-vl/infinigen/blob/main/infinigen/tools/terrain/palette/readme.md In Infinigen configurations, use the 'palette' keyword to sample colors from generated palettes for various material properties. ```python assets.materials.water.shader.color = ("palette", "water") assets.materials.ocean.shader.color = ("palette", "water") assets.materials.mountain.shader.color = ("palette", "mountain rock") assets.materials.sand.shader.color = ("palette", "desert") assets.materials.sandstone.shader.color = ("palette", "sandstone") ``` -------------------------------- ### View Available Export Formats Source: https://github.com/princeton-vl/infinigen/blob/main/docs/GeneratingIndividualAssets.md Run this command to see a full list of supported export formats and other command-line arguments for the generation script. ```bash # See the full list of supported formats python -m infinigen_examples.generate_individual_assets --help ``` -------------------------------- ### Run Tests for 'door' Asset with 10 Seeds Source: https://github.com/princeton-vl/infinigen/blob/main/docs/simulation/VerifyingSimAssets.md Execute simulation asset tests for the 'door' asset using 10 different seeds. ```bash pytest tests/sim --asset door --nr 10 ``` -------------------------------- ### Generate Kitchen Scene (Blender File) Source: https://github.com/princeton-vl/infinigen/blob/main/docs/HelloRoom.md Generates a 3D Blender file for a kitchen scene. This command is configured for a single room, first-person view, and excludes terrain for faster processing. Use this to create a kitchen environment. ```bash python -m infinigen_examples.generate_indoors --seed 0 --task coarse --output_folder outputs/indoors/coarse -g fast_solve.gin singleroom.gin -p compose_indoors.terrain_enabled=False restrict_solving.restrict_parent_rooms=["Kitchen"] ``` -------------------------------- ### Analyze Infinigen vs. ATISS Layout Realism Source: https://github.com/princeton-vl/infinigen/blob/main/infinigen/tools/perceptual/analysis.ipynb Compares Infinigen's first-person layout realism against ATISS using a CSV file. Prints the proportion and 99% confidence interval. ```python src = './results/infinigen-ATISS-first-person-layout-realism.csv' df = pd.read_csv(src) print(f'Infinigen first person layout is more realistic than ATISS {A_count_proportion(df)[0]:.3f} of the time. 99% confidence interval: {A_count_proportion(df)[1]:.3f} - {A_count_proportion(df)[2]:.3f}') ``` -------------------------------- ### Analyze Infinigen vs. Procthor Layout Realism Source: https://github.com/princeton-vl/infinigen/blob/main/infinigen/tools/perceptual/analysis.ipynb Compares Infinigen's first-person layout realism against Procthor using a CSV file. Prints the proportion and 99% confidence interval. ```python src = './results/infinigen-procthor-first-person-layout-realism.csv' df = pd.read_csv(src) print(f'Infinigen first person layout is more realistic than Procthor {A_count_proportion(df)[0]:.3f} of the time. 99% confidence interval: {A_count_proportion(df)[1]:.3f} - {A_count_proportion(df)[2]:.3f}') ``` -------------------------------- ### Analyze Infinigen vs. Sceneformer Overhead Layout Realism Source: https://github.com/princeton-vl/infinigen/blob/main/infinigen/tools/perceptual/analysis.ipynb Compares Infinigen's overhead layout realism against Sceneformer using a CSV file. Prints the proportion and 99% confidence interval. ```python src = './results/infinigen-sceneformer-overhead-layout-realism.csv' df = pd.read_csv(src) ``` -------------------------------- ### Check Vertex Count for 'door' and 'drawer' with 10 Seeds Source: https://github.com/princeton-vl/infinigen/blob/main/docs/simulation/VerifyingSimAssets.md Execute the 'test_asset_vertex_count' test for 'door' and 'drawer' assets, using 10 seeds (0-9) for each. ```bash pytest tests/sim/test_blender_assets.py::TestBlenderAssets::test_asset_vertex_count --asset door drawer --nr 10 ``` -------------------------------- ### Run All Tests for 'door' Asset Source: https://github.com/princeton-vl/infinigen/blob/main/docs/simulation/VerifyingSimAssets.md Execute all simulation asset tests specifically for the 'door' asset. ```bash pytest tests/sim --asset door ``` -------------------------------- ### Visualize Segmentation Masks and 3D Bounding Boxes Source: https://github.com/princeton-vl/infinigen/blob/main/docs/GroundTruthAnnotations.md These commands demonstrate how to visualize 2D and 3D bounding boxes for specific object types within a scene's segmentation masks. Use the --query flag to specify the object type, or omit it to list available tags. ```bash python -m tools.ground_truth.segmentation_lookup outputs/hello_world/0 48 --query rock --boxes ``` ```bash python -m tools.ground_truth.bounding_boxes_3d outputs/hello_world/0 48 --query rock ``` -------------------------------- ### Load Infinigen Data with PyTorch Dataset Class Source: https://github.com/princeton-vl/infinigen/blob/main/docs/PreGeneratedData.md This snippet demonstrates how to load downloaded Infinigen data using a PyTorch-style dataset class. Ensure the 'outputs/my_download' path and 'data_types' match your download configuration. This requires the 'dataset_loader.py' and 'suffixes.py' files. ```python from infinigen.tools.dataset_loader import get_infinigen_dataset dataset = get_infinigen_dataset("outputs/my_download", data_types=["Image_png", "Depth_npy"]) print(len(dataset)) print(dataset[0].keys()) ``` -------------------------------- ### Analyze Infinigen vs. Sceneformer Layout Realism Source: https://github.com/princeton-vl/infinigen/blob/main/infinigen/tools/perceptual/analysis.ipynb Compares Infinigen's first-person layout realism against Sceneformer using a CSV file. Prints the proportion and 99% confidence interval. ```python src = './results/infinigen-sceneformer-first-person-layout-realism.csv' df = pd.read_csv(src) print(f'Infinigen first person layout is more realistic than Sceneformer {A_count_proportion(df)[0]:.3f} of the time. 99% confidence interval: {A_count_proportion(df)[1]:.3f} - {A_count_proportion(df)[2]:.3f}') ``` -------------------------------- ### Generate a Single Indoor Scene Source: https://github.com/princeton-vl/infinigen/blob/main/docs/HelloRoom.md Use this command to generate a single indoor scene. Specify the output folder, number of scenes, pipeline configurations, and specific overrides for scene generation. ```bash python -m infinigen.datagen.manage_jobs --output_folder outputs/my_dataset --num_scenes 1 --pipeline_configs local_256GB.gin monocular.gin blender_gt.gin indoor_background_configs.gin --configs singleroom.gin --pipeline_overrides get_cmd.driver_script='infinigen_examples.generate_indoors' manage_datagen_jobs.num_concurrent=16 --overrides compose_indoors.restrict_single_supported_roomtype=True ``` -------------------------------- ### Import Pre-generated Fire for Scene Generation Source: https://github.com/princeton-vl/infinigen/blob/main/docs/GeneratingFluidSimulations.md Use this command to generate scenes with pre-cached fire assets. Ensure `config/use_cached_fire.gin` is correctly configured with the path to your pre-generated fire assets. ```bash python -m infinigen.datagen.manage_jobs --specific_seed 3930249d --output_folder outputs/fire --num_scenes 1 --pipeline_config local_256GB.gin monocular_video.gin --cleanup none --config plain.gin fast_terrain_assets.gin use_cached_fire.gin --pipeline_overrides get_cmd.interactive_blender=True ``` -------------------------------- ### Generate Whole Home Scene (Overhead View) Source: https://github.com/princeton-vl/infinigen/blob/main/docs/HelloRoom.md Generates a whole home scene with objects, viewed from overhead. Note that this process can be time-consuming. Terrain is disabled for this generation. ```bash python -m infinigen_examples.generate_indoors --seed 0 --task coarse --output_folder outputs/indoors/coarse -g fast_solve.gin overhead.gin -p compose_indoors.terrain_enabled=False ``` -------------------------------- ### Generate a Large Dataset of Indoor Scenes Source: https://github.com/princeton-vl/infinigen/blob/main/docs/HelloRoom.md Recommended for creating large datasets of random rooms. This command generates 1000 scenes with specified configurations and overrides. ```bash python -m infinigen.datagen.manage_jobs --output_folder outputs/my_dataset --num_scenes 1000 --pipeline_configs local_256GB.gin monocular.gin blender_gt.gin indoor_background_configs.gin --configs singleroom.gin --pipeline_overrides get_cmd.driver_script='infinigen_examples.generate_indoors' manage_datagen_jobs.num_concurrent=16 --overrides compose_indoors.restrict_single_supported_roomtype=True ``` -------------------------------- ### Generate Stereo Cameras for Nature Scenes Source: https://github.com/princeton-vl/infinigen/blob/main/docs/ConfiguringCameras.md Use this command to generate multiple nature scenes, each with a single stereo camera. It configures high-quality terrain and uses a specific pipeline for stereo matching. ```bash python -m infinigen.datagen.manage_jobs --output_folder outputs/stereo_nature --num_scenes 30 \ --pipeline_config stereo.gin local_256GB.gin cuda_terrain.gin blender_gt.gin --configs high_quality_terrain ```