SPAR-7M-RGBD / README.md
jasonzhango's picture
Update README.md
76615c3 verified

GitHub Code arXiv Website

πŸ“¦ Spatial Perception And Reasoning Dataset – RGBD (SPAR-7M-RGBD)

A large-scale multimodal dataset for 3D-aware spatial perception and reasoning in vision-language models.

SPAR-7M-RGBD extends the original SPAR-7M with additional depths, camera intrinsics, and pose information. It contains over 7 million QA pairs across 33 spatial tasks, built from 4,500+ richly annotated indoor 3D scenes.

This version supports single-view, multi-view, and video-based inputs.

πŸ“₯ Download

We provide two versions of the dataset:

Version Description
SPAR-7M RGB-only images + QA annotations
SPAR-7M-RGBD Includes depths, camera intrinsics, and pose matrices for 3D-aware training

You can download both versions from Hugging Face:

# Download SPAR-7M (default)
huggingface-cli download jasonzhango/SPAR-7M --repo-type dataset

# Download SPAR-7M-RGBD (with depth and camera parameters)
huggingface-cli download jasonzhango/SPAR-7M-RGBD --repo-type dataset

These datasets are split into multiple .tar.gz parts due to Hugging Face file size limits. After downloading all parts, run the following to extract:

# For SPAR-7M
cat spar-*.tar.gz | tar -xvzf -

# For SPAR-7M-RGBD
cat spar-rgbd-*.tar.gz | tar -xvzf -

Alternatively, if Hugging Face is not accessible, you can use the provided script:

wget https://hf-mirror.com/hfd/hfd.sh

chmod a+x hfd.sh

export HF_ENDPOINT=https://hf-mirror.com

./hfd.sh jasonzhango/SPAR-7M --dataset
./hfd.sh jasonzhango/SPAR-7M-RGBD --dataset

The dataset directory structure is:

spar/
β”œβ”€β”€ rxr/
β”œβ”€β”€ scannet/
β”‚   β”œβ”€β”€ images/
β”‚   |   └── scene0000_00/
β”‚   |       β”œβ”€β”€ image_color/
β”‚   |       β”œβ”€β”€ video_color/
β”‚   |       β”œβ”€β”€ image_depth/           # only in SPAR-7M-RGBD
β”‚   |       β”œβ”€β”€ video_depth/           # only in SPAR-7M-RGBD
β”‚   |       β”œβ”€β”€ pose/                  # only in SPAR-7M-RGBD
β”‚   |       β”œβ”€β”€ video_pose/            # only in SPAR-7M-RGBD
β”‚   |       β”œβ”€β”€ intrinsic/             # only in SPAR-7M-RGBD
β”‚   |       └── video_idx.txt
β”‚   └── qa_jsonl/
β”‚       β”œβ”€β”€ train/
β”‚       |   β”œβ”€β”€ depth_prediction_oo/
β”‚       |   |   β”œβ”€β”€ fill/
β”‚       |   |   |   └── fill_76837.jsonl
β”‚       |   |   β”œβ”€β”€ select/
β”‚       |   |   └── sentence/
β”‚       |   β”œβ”€β”€ obj_spatial_relation_oc/
β”‚       |   └── spatial_imagination_oo_mv/
β”‚       └── val/
β”œβ”€β”€ scannetpp/
└── structured3d/

Each QA task (e.g., depth_prediction_oc, spatial_relation_oo_mv, etc.) is organized by task type, with subfolders for different answer formats:

  • fill/ β€” numerical or descriptive answers
  • select/ β€” multiple choice
  • sentence/ β€” natural language answers

πŸ“š Bibtex

If you find this project or dataset helpful, please consider citing our paper:

@article{zhang2025from,
    title={From Flatland to Space: Teaching Vision-Language Models to Perceive and Reason in 3D},
    author={Zhang, Jiahui and Chen, Yurui and Xu, Yueming and Huang, Ze and Mei, Jilin and Chen, Junhui and Zhou, Yanpeng and Yuan, Yujie and Cai, Xinyue and Huang, Guowei and Quan, Xingyue and Xu, Hang and Zhang, Li},
    year={2025},
    journal={arXiv preprint arXiv:2503.22976},
}