SpatialGen-Testset / README.md
Chuan99's picture
Enhance dataset card with task categories, tags, intro, and sample usage (#2)
ccd2531 verified
metadata
license: cc-by-nc-4.0
task_categories:
  - image-to-3d
  - text-to-3d
tags:
  - 3d
  - scene-generation
  - indoor-scenes

SpatialGen Testset

This repository contains the test set for SPATIALGEN: Layout-guided 3D Indoor Scene Generation, a novel multi-view multi-modal diffusion model for generating realistic and semantically consistent 3D indoor scenes.

Project page | Paper | Code

We provide a test set of 48 preprocessed point clouds and their corresponding GT layouts, multi-view images are cropped from the high-resolution panoramic images.

Folder Structure

Outlines of the dataset files:

SpatialGen-Testset
|-- {scene_id}                # scene folder          
|   |-- rgb                   # multi-view color images
|   |-- semantic              # multi-view semantic maps
|   |-- depth                 # multi-view depth maps
|   |-- normal                # multi-view normal maps
|   |-- layout_depth          # rendered depth maps of the GT layout
|   |-- layout_semantic       # rendered semantic maps of the GT layout
|   |-- cameras.json          # camera parameters for the scene
|   |-- room_layout.json      # GT structured layout in JSON format
│   └-- test_split.txt        # testing split
└── test_split_caption.jsonl  # textural captions for each scene

Sample Usage

Visualization

We provide a code to visualize the layout data.

data_root_dir = "./example_data/scenes"
vis_root_dir = "./visualization"
scene_data_dirs = [os.path.join(data_root_dir, d) for d in os.listdir(data_root_dir) if d.startswith("scene_")]

for scene_data_dir in scene_data_dirs:
    vis_output_dir = os.path.join(vis_root_dir, scene_data_dir.split('/')[-1])
    # save layout_bbox.ply and camera poses in vis_output_dir
    visualize_spatialgen_data(scene_data_dir, vis_output_dir)

Inference

This dataset is used for evaluating the SpatialGen models for 3D indoor scene generation. The following commands from the code repository demonstrate how to run inference for different tasks (after following the installation instructions in the repository).

Single image-to-3D Scene Generation

bash scripts/infer_spatialgen_i2s.sh

Text-to-image-to-3D Scene Generation

You can choose a pair of scene_id and prompt from captions/spatialgen_testset_captions.jsonl to run the text-to-scene experiment.

bash scripts/infer_spatialgen_t2s.sh