Spatialworld-bench / README.md
Spatialworld's picture
Update README.md
9354f78 verified
metadata
language:
  - en
license: cc-by-nc-4.0
tags:
  - vision-language
  - spatial-reasoning
  - 3d-navigation
  - multi-agent
datasets:
  - ai2thor
  - carla
  - procthor
  - virtualhome
  - EmbodiedCity
size_categories:
  - 1K<n<10K

SpatialWorld Benchmark

A Multi-Platform Benchmark for Spatial Reasoning and Spatial Task Execution

๐ŸŽฏ Overview

SpatialWorld is a comprehensive benchmark designed to evaluate spatial reasoning and spatial task execution capabilities of Multi-modal Large Language Models (MLLMs) and Vision-Language Models (VLMs). The benchmark spans multiple simulation platforms and diverse task categories.

Key Features

  • Multi-Platform Coverage: AI2Thor, CARLA, ProcTHOR, VirtualHome, EmbodiedCity
  • Diverse Tasks: Navigation, object manipulation, multi-agent coordination, and spatial reasoning
  • Unified Action Space: Consistent action representation across all platforms
  • Rich Annotations: Golden actions and success conditions for reproducible evaluation

๐Ÿ“Š Dataset Statistics

This Hugging Face repository contains the SpatialWorld Benchmark with 588 tasks in the unified dataset:

Platform Unified Tasks Full Dataset (benchmark.zip) Task Types Unique Fields
AI2Thor 343 2,500+ Object manipulation, navigation Category, Evaluation_Type, Level
CARLA 80 80 Urban navigation, traffic scenarios executor, image_url, input_modality, origin_location, weather
ProcTHOR 127 127 Indoor navigation, household tasks scene_index, Category, Evaluation_Type, Level
VirtualHome 38 38 Multi-agent household activities executor, image_url, input_modality, origin_location, weather
Total 588 ~2,745 Multi-platform spatial reasoning 20 fields total

๐Ÿ—‚๏ธ Repository Structure

spatialworld-test.jsonl    # Unified dataset (588 tasks, 20 columns)
benchmark.zip              # Full original dataset (8695 files, ~1GB)
README.md                  # This file

Two versions of the data are provided:

  1. spatialworld-test.jsonl (Unified): All 588 tasks in a unified schema with 20 columns. HF Dataset Viewer parses this file.

    • Schema differences handled by including all possible fields
    • Missing fields use null
    • Complex nested structures encoded as JSON strings
    • Actions converted to Unified Action Space format
  2. benchmark.zip (Full Original Dataset): Complete raw task.json files (~1GB, 8695 files).

    • Download and unzip to get the original folder structure: benchmark/ai2thor/, benchmark/carla/, benchmark/procthor/, benchmark/virtualhome/
    • Use this if you need the original JSON format with platform-specific structures

๐ŸŽฎ Unified Action Space

All tasks use a standardized action space:

Navigation

  • Move(direction, distance) - direction: forward/backward/left/right

Viewpoint & Posture

  • Rotate(direction, angle) - direction: left/right
  • Tilt(direction, angle) - direction: up/down
  • ChangePosture(pose) - standing/sitting/lying

Interaction

  • Pick(object) - Pick up an object
  • Place(target) - Place held object at target
  • ChangeState(object, state) - Toggle object state (on/off)
  • Manipulate(object, action) - Complex manipulation (open/close/clean/slice)

Task Control

  • EndTask(status) - Terminate task (success/stopped)
  • Communicate(message) - Agent-to-agent communication

๐Ÿ“ Task Format

Each task contains:

{
  "task_id": "ai2thor00000",
  "task_name": "Place object in target",
  "instruction": "Natural language task description",
  "scene": "FloorPlan17",
  "golden_actions": {
    "steps": 10,
    "actions": [
      "Move(forward, 1.0)",
      "Rotate(right, 90)",
      "Pick(Object)",
      "Place(Target)",
      "EndTask(success)"
    ]
  },
  "success_conditions": [...],
  "max_steps": 50
}

๐Ÿ”ง Usage

Loading from Hugging Face

from datasets import load_dataset
import json

# Load the full dataset (all 630 tasks, all 20 fields)
dataset = load_dataset("Spatialworld/Spatialworld-bench", split="train")

# Access a task - all fields are available
task = dataset[0]
print(f"Task: {task['task_id']} ({task['platform']})")
print(f"Instruction: {task['instruction']}")
print(f"Scene: {task['scene']}")

# Parse JSON-encoded fields
golden_actions = json.loads(task["golden_actions"])
success_conditions = json.loads(task["success_conditions"])
target_objects = json.loads(task["target_object_types"])

# Platform-specific fields (null if not applicable)
print(f"Category: {task['Category']}")  # Only for ai2thor/procthor
print(f"Executor: {task['executor']}")   # Only for carla/virtualhome

Dataset Schema

Field Type Description Platforms
task_id string Unique identifier All
task_name string Human-readable name All
platform string Platform name All
instruction string Natural language instruction All
scene string Scene identifier ai2thor, carla, virtualhome
max_steps int Maximum steps All
golden_actions string (JSON) Action sequence All
success_conditions string (JSON) Success criteria All
target_object_types string (JSON) Target objects ai2thor, procthor
success_logic string AND/OR logic ai2thor, procthor
target_description string Detailed description ai2thor, procthor
Category string Task category ai2thor, procthor
Evaluation_Type string Evaluation type ai2thor, procthor
Level string Difficulty level ai2thor, procthor
executor string Executor type carla, virtualhome
image_url string Image path carla, virtualhome
input_modality string Input type carla, virtualhome
origin_location bool Origin flag carla, virtualhome
scene_index int Scene number procthor
weather string Weather condition carla, virtualhome

Loading Original Tasks (Local)

For full benchmark with original JSON structures:

import json
from pathlib import Path

def load_task(platform, task_id):
    task_path = Path(f"benchmark/{platform}/tasks/{task_id}/task.json")
    with open(task_path, 'r') as f:
        return json.load(f)

# Example
task = load_task("ai2thor", "ai2thor00000")
print(task["instruction"])
print(task["golden_actions"]["actions"])

Data Format

The Hugging Face dataset provides a unified schema across all platforms:

Field Type Description
task_id string Unique identifier (e.g., "ai2thor00000")
platform string Platform name (ai2thor/carla/procthor/virtualhome)
task_name string Human-readable task name
instruction string Natural language instruction
scene string Scene identifier (FloorPlan, Town, etc.)
max_steps int Maximum allowed steps
golden_actions_json string JSON-encoded golden action sequence
success_conditions_json string JSON-encoded success conditions
target_object_types_json string JSON-encoded target objects
success_logic string Logic for combining success conditions (AND/OR)
target_description string Detailed target description
platform_specific_json string Platform-specific fields (scene_index, executor, etc.)

Action Parsing

import re

def parse_action(action_str):
    """Parse action string to (action_name, args)"""
    match = re.match(r'^(\w+)\(([^)]*)\)$', action_str)
    if match:
        name = match.group(1)
        args = [arg.strip() for arg in match.group(2).split(',')]
        return name, args
    return None, None

# Example
action = "Move(forward, 1.0)"
name, args = parse_action(action)
# name: "Move", args: ["forward", "1.0"]

๐Ÿ“ Evaluation

Tasks are evaluated based on:

  1. Success Rate: Percentage of tasks completed successfully
  2. Action Efficiency: Steps used vs. golden actions
  3. Goal Achievement: Satisfaction of success conditions

Success Conditions

  • object_state: Target object in desired state
  • object_in_receptacle: Object placed in correct container
  • polygon_area: Agent reached target location
  • agent_near_object: Agent within distance of target

๐Ÿ“œ License

This dataset is released under CC BY-NC 4.0 (Creative Commons Attribution-NonCommercial 4.0 International).


Note: This is an anonymized version of the dataset prepared for peer review.