CoolFace
Datasetpublic

turhancan97/SpaRRTa

SpaRRTa: A Synthetic Benchmark for Evaluating Spatial Intelligence in Visual Foundation Models SpaRRTa is a synthetic benchmark that probes whether Visual Foundation Models (VFMs) β€” such as DINO, DINOv2/v3, MAE, CroCo, VGGT, SPA and CLIP β€” encode the spatial relations between objects in a scene, rather than only their semantic identity. πŸ“„ Paper: arXiv:2601.11729 πŸ’» Code: github.com/gmum/SpaRRTa 🧱 Real-world (lego) split: turhancan97/SpaRRTa-Lego πŸ”¬ Attention-analysis split (images +… See the full description on the dataset page: https://huggingface.co/datasets/turhancan97/SpaRRTa.

sourceHugging Facemitupdated 3mo agoView on Hugging Face
1likes353downloads
Dataset Card

<h1 style="display:flex; align-items:center; gap:10px;"> <img src="assets/logo.png" alt="Logo" width="55"> <span style="color:#FF7096;">SpaRRTa</span>: A Synthetic Benchmark for Evaluating Spatial Intelligence in Visual Foundation Models </h1>

SpaRRTa is a synthetic benchmark that probes whether Visual Foundation Models (VFMs) β€” such as DINO, DINOv2/v3, MAE, CroCo, VGGT, SPA and CLIP β€” encode the spatial relations between objects in a scene, rather than only their semantic identity.

This repository hosts the synthetic (Unreal Engine 5) portion of the benchmark. It is complemented by two companion splits: the real-world set photographed with toy minifigures for sim-to-real evaluation (`turhancan97/SpaRRTa-Lego`), and an attention-analysis set with per-object segmentation masks (`turhancan97/SpaRRTa-Attention`).

<p align="center"> <img src="assets/teaser.png" alt="SpaRRTa teaser" width="100%"> </p>

The task

SpaRRTa is a 4-way classification problem β€” Front / Back / Left / Right β€” asking where a target object lies relative to a reference object, from a given viewpoint. It has two variants:

  • β€”SpaRRTa-ego (egocentric): directions are defined from the camera's viewpoint.
  • β€”SpaRRTa-allo (allocentric): directions are defined from a human figure's viewpoint in the scene, which requires implicit perspective-taking.

Both variants use the same images: each sample's params_*.json stores the 3D positions of the camera, the human, and the scene objects, so the egocentric/allocentric label is computed at load time by choosing the observer (camera vs. human). Direction labels are therefore derived from geometry, not stored as a column β€” the dataset provides the raw positions and the code turns them into Front/Back/Left/Right labels (excluding configurations within Β±15Β° of a diagonal boundary as ambiguous).

Note: the actor_labels column lists object identities (e.g. Human, Tree, Truck), not the Front/Back/Left/Right classes. Which object is the reference and which is the target is an experiment setting defined per environment in the code.

Environments

Rendered in Unreal Engine 5 (β‰ˆ2048Γ—2048 px) across five environments, each with three variants: bridge, city, desert, forest, winter_town.

The overall data-generation and probing pipeline is summarized below:

<p align="center"> <img src="assets/pipeline.png" alt="SpaRRTa data-generation and probing pipeline" width="100%"> </p>

Dataset statistics

  • β€”Total samples: 149,145 (single train split)
  • β€”Broken / missing pairs: 0
  • β€”Splits: shipped as train only; train/validation/test partitions are produced deterministically in the training code from a fixed seed (so results are reproducible from this single split).

Scene coverage

scene_variantscenevariantsamples
bridgebridge19,834
bridge_2bridge29,834
bridge_3bridge39,834
citycity110,000
city_2city210,000
city_3city310,000
desertdesert110,000
desert_2desert210,000
desert_3desert310,000
forestforest110,000
forest_2forest210,000
forest_3forest310,000
winter_townwinter_town19,881
winter_town_2winter_town29,881
winter_town_3winter_town39,881
Total149,145

Columns

  • β€”sample_id (string): stable unique id (scene_variant:frame_id)
  • β€”scene (string): base scene name (e.g. bridge)
  • β€”variant (int): numeric variant from folder suffix (bridge_3 β†’ 3, base folder β†’ 1)
  • β€”scene_variant (string): source folder name (this is the value used as environment= in the code)
  • β€”frame_id (int): numeric frame id from filename
  • β€”image (image): rendered RGB frame (embedded bytes + relative path)
  • β€”image_relpath (string): relative source image path
  • β€”params_relpath (string): relative source JSON path
  • β€”raw_params_json (string): full original JSON text (camera, actors, source)
  • β€”camera_json (string): camera section (location, rotation, intrinsics)
  • β€”actors_json (string): actors section (per-object label + 3D location)
  • β€”source_json (string): source section
  • β€”actor_labels (list[string]): unique object identities found in actors
  • β€”has_label_mapping (bool): whether source.label_mapping exists
  • β€”label_mapping_json (string): full mapping JSON
  • β€”label_mapping_keys (list[string]): mapping keys
  • β€”label_mapping_values (list[string]): mapping values
  • β€”original_params_name (string): source.original_params when present
  • β€”upload_batch_utc (string): UTC timestamp of upload run

Loading

python
from datasets import load_dataset

ds = load_dataset("turhancan97/SpaRRTa", split="train")
print(ds[0]["scene_variant"], ds[0]["actor_labels"])
ds[0]["image"]  # PIL.Image (decoded automatically)

Download to a local machine

bash
huggingface-cli download turhancan97/SpaRRTa --repo-type dataset --local-dir ./hf_SpaRRTa

Use with the SpaRRTa code

The training code reads images and annotations from disk under $SPARRTA_DATA_ROOT/<environment>/mid-objects/. The snippet below reconstructs exactly that layout from the parquet shards:

python
from pathlib import Path
from datasets import load_dataset, Image

repo_id = "turhancan97/SpaRRTa"
output_root = Path("position_between_objects")
output_root.mkdir(parents=True, exist_ok=True)

ds = load_dataset(repo_id, split="train")
ds = ds.cast_column("image", Image(decode=False))  # keep raw bytes

for row in ds:
    # Reconstruct <output>/<scene_variant>/mid-objects/img_XXXX.jpg + params_XXXX.json
    mid = output_root / row["scene_variant"] / "mid-objects"
    mid.mkdir(parents=True, exist_ok=True)

    image_name = Path(row["image_relpath"]).name
    params_name = Path(row["params_relpath"]).name

    image_bytes = row["image"]["bytes"]
    if image_bytes is None:
        raise RuntimeError(f"Missing embedded image bytes for {row['sample_id']}")

    (mid / image_name).write_bytes(image_bytes)
    (mid / params_name).write_text(row["raw_params_json"], encoding="utf-8")

Then point the code at the reconstructed folder and train a probe (e.g. egocentric forest with DINO + EfficientProbing):

bash
export SPARRTA_DATA_ROOT=$(pwd)/position_between_objects
python train.py \
  backbone=dino_b16 \
  dataset=unreal_position \
  probe=classifier probe._target_=sparrta.models.probes.EfficientProbing \
  dataset.perspective=camera \
  environment=forest

Use dataset.perspective=human for the allocentric task, and any scene_variant above as the environment= value. See the code repository for full instructions, backbones, and probing heads.

License

Released under the MIT License.

Citation

If you find this dataset useful, please consider citing:

bibtex
@misc{kargin2026sparrta,
  title={SpaRRTa: A Synthetic Benchmark for Evaluating Spatial Intelligence in Visual Foundation Models},
  author={Turhan Can Kargin and Wojciech JasiΕ„ski and Adam Pardyl and Bartosz ZieliΕ„ski and Marcin PrzewiΔ™ΕΊlikowski},
  year={2026},
  eprint={2601.11729},
  archivePrefix={arXiv},
  primaryClass={cs.CV},
  url={https://arxiv.org/abs/2601.11729}
}