Update README.md
Browse files
README.md
CHANGED
|
@@ -1,250 +1,246 @@
|
|
| 1 |
-
---
|
| 2 |
-
language:
|
| 3 |
-
- en
|
| 4 |
-
license: cc-by-nc-4.0
|
| 5 |
-
tags:
|
| 6 |
-
-
|
| 7 |
-
-
|
| 8 |
-
-
|
| 9 |
-
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
-
|
| 13 |
-
-
|
| 14 |
-
-
|
| 15 |
-
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
- **
|
| 32 |
-
- **
|
| 33 |
-
- **
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
|
| 41 |
-
|
|
| 42 |
-
|
|
| 43 |
-
|
|
| 44 |
-
|
|
| 45 |
-
|
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
-
|
| 60 |
-
-
|
| 61 |
-
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
- `
|
| 77 |
-
- `
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
- `
|
| 82 |
-
- `
|
| 83 |
-
- `
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
- `
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
"
|
| 97 |
-
"
|
| 98 |
-
"
|
| 99 |
-
"
|
| 100 |
-
|
| 101 |
-
"
|
| 102 |
-
|
| 103 |
-
"
|
| 104 |
-
"
|
| 105 |
-
"
|
| 106 |
-
"
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
"
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
task
|
| 128 |
-
print(f"
|
| 129 |
-
print(f"
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
print(f"
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
|
| 145 |
-
|
|
| 146 |
-
| `
|
| 147 |
-
| `
|
| 148 |
-
| `
|
| 149 |
-
| `
|
| 150 |
-
| `
|
| 151 |
-
| `
|
| 152 |
-
| `
|
| 153 |
-
| `
|
| 154 |
-
| `
|
| 155 |
-
| `
|
| 156 |
-
| `
|
| 157 |
-
| `
|
| 158 |
-
| `
|
| 159 |
-
| `
|
| 160 |
-
| `
|
| 161 |
-
| `
|
| 162 |
-
| `
|
| 163 |
-
| `
|
| 164 |
-
| `
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
import
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
task_path
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
print(task["
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
|
| 191 |
-
|
|
| 192 |
-
| `
|
| 193 |
-
| `
|
| 194 |
-
| `
|
| 195 |
-
| `
|
| 196 |
-
| `
|
| 197 |
-
| `
|
| 198 |
-
| `
|
| 199 |
-
| `
|
| 200 |
-
| `
|
| 201 |
-
| `
|
| 202 |
-
| `
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
name, args
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
- `
|
| 236 |
-
- `
|
| 237 |
-
- `
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
---
|
| 249 |
-
|
| 250 |
-
**Note**: This is an anonymized version of the dataset prepared for peer review.
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: cc-by-nc-4.0
|
| 5 |
+
tags:
|
| 6 |
+
- vision-language
|
| 7 |
+
- spatial-reasoning
|
| 8 |
+
- 3d-navigation
|
| 9 |
+
- multi-agent
|
| 10 |
+
datasets:
|
| 11 |
+
- ai2thor
|
| 12 |
+
- carla
|
| 13 |
+
- procthor
|
| 14 |
+
- virtualhome
|
| 15 |
+
- EmbodiedCity
|
| 16 |
+
size_categories:
|
| 17 |
+
- 1K<n<10K
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
# SpatialWorld Benchmark
|
| 21 |
+
|
| 22 |
+
**A Multi-Platform Benchmark for Spatial Reasoning and Spatial Task Execution**
|
| 23 |
+
|
| 24 |
+
## 🎯 Overview
|
| 25 |
+
|
| 26 |
+
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.
|
| 27 |
+
|
| 28 |
+
### Key Features
|
| 29 |
+
|
| 30 |
+
- **Multi-Platform Coverage**: AI2Thor, CARLA, ProcTHOR, VirtualHome, EmbodiedCity
|
| 31 |
+
- **Diverse Tasks**: Navigation, object manipulation, multi-agent coordination, and spatial reasoning
|
| 32 |
+
- **Unified Action Space**: Consistent action representation across all platforms
|
| 33 |
+
- **Rich Annotations**: Golden actions and success conditions for reproducible evaluation
|
| 34 |
+
|
| 35 |
+
## 📊 Dataset Statistics
|
| 36 |
+
|
| 37 |
+
This Hugging Face repository contains the **SpatialWorld Benchmark** with 588 tasks in the unified dataset:
|
| 38 |
+
|
| 39 |
+
| Platform | Unified Tasks | Full Dataset (benchmark.zip) | Task Types | Unique Fields |
|
| 40 |
+
|----------|---------------|------------------------------|------------|---------------|
|
| 41 |
+
| AI2Thor | 343 | 2,500+ | Object manipulation, navigation | Category, Evaluation_Type, Level |
|
| 42 |
+
| CARLA | 80 | 80 | Urban navigation, traffic scenarios | executor, image_url, input_modality, origin_location, weather |
|
| 43 |
+
| ProcTHOR | 127 | 127 | Indoor navigation, household tasks | scene_index, Category, Evaluation_Type, Level |
|
| 44 |
+
| VirtualHome | 38 | 38 | Multi-agent household activities | executor, image_url, input_modality, origin_location, weather |
|
| 45 |
+
| **Total** | **588** | **~2,745** | Multi-platform spatial reasoning | **20 fields total** |
|
| 46 |
+
|
| 47 |
+
## 🗂️ Repository Structure
|
| 48 |
+
|
| 49 |
+
```
|
| 50 |
+
spatialworld-test.jsonl # Unified dataset (588 tasks, 20 columns)
|
| 51 |
+
benchmark.zip # Full original dataset (8695 files, ~1GB)
|
| 52 |
+
README.md # This file
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
Two versions of the data are provided:
|
| 56 |
+
|
| 57 |
+
1. **`spatialworld-test.jsonl`** (Unified): All 588 tasks in a unified schema with 20 columns. HF Dataset Viewer parses this file.
|
| 58 |
+
- Schema differences handled by including all possible fields
|
| 59 |
+
- Missing fields use `null`
|
| 60 |
+
- Complex nested structures encoded as JSON strings
|
| 61 |
+
- Actions converted to Unified Action Space format
|
| 62 |
+
|
| 63 |
+
2. **`benchmark.zip`** (Full Original Dataset): Complete raw task.json files (~1GB, 8695 files).
|
| 64 |
+
- Download and unzip to get the original folder structure: `benchmark/ai2thor/`, `benchmark/carla/`, `benchmark/procthor/`, `benchmark/virtualhome/`
|
| 65 |
+
- Use this if you need the original JSON format with platform-specific structures
|
| 66 |
+
|
| 67 |
+
## 🎮 Unified Action Space
|
| 68 |
+
|
| 69 |
+
All tasks use a standardized action space:
|
| 70 |
+
|
| 71 |
+
### Navigation
|
| 72 |
+
- `Move(direction, distance)` - direction: forward/backward/left/right
|
| 73 |
+
|
| 74 |
+
### Viewpoint & Posture
|
| 75 |
+
- `Rotate(direction, angle)` - direction: left/right
|
| 76 |
+
- `Tilt(direction, angle)` - direction: up/down
|
| 77 |
+
- `ChangePosture(pose)` - standing/sitting/lying
|
| 78 |
+
|
| 79 |
+
### Interaction
|
| 80 |
+
- `Pick(object)` - Pick up an object
|
| 81 |
+
- `Place(target)` - Place held object at target
|
| 82 |
+
- `ChangeState(object, state)` - Toggle object state (on/off)
|
| 83 |
+
- `Manipulate(object, action)` - Complex manipulation (open/close/clean/slice)
|
| 84 |
+
|
| 85 |
+
### Task Control
|
| 86 |
+
- `EndTask(status)` - Terminate task (success/stopped)
|
| 87 |
+
- `Communicate(message)` - Agent-to-agent communication
|
| 88 |
+
|
| 89 |
+
## 📁 Task Format
|
| 90 |
+
|
| 91 |
+
Each task contains:
|
| 92 |
+
|
| 93 |
+
```json
|
| 94 |
+
{
|
| 95 |
+
"task_id": "ai2thor00000",
|
| 96 |
+
"task_name": "Place object in target",
|
| 97 |
+
"instruction": "Natural language task description",
|
| 98 |
+
"scene": "FloorPlan17",
|
| 99 |
+
"golden_actions": {
|
| 100 |
+
"steps": 10,
|
| 101 |
+
"actions": [
|
| 102 |
+
"Move(forward, 1.0)",
|
| 103 |
+
"Rotate(right, 90)",
|
| 104 |
+
"Pick(Object)",
|
| 105 |
+
"Place(Target)",
|
| 106 |
+
"EndTask(success)"
|
| 107 |
+
]
|
| 108 |
+
},
|
| 109 |
+
"success_conditions": [...],
|
| 110 |
+
"max_steps": 50
|
| 111 |
+
}
|
| 112 |
+
```
|
| 113 |
+
|
| 114 |
+
## 🔧 Usage
|
| 115 |
+
|
| 116 |
+
### Loading from Hugging Face
|
| 117 |
+
|
| 118 |
+
```python
|
| 119 |
+
from datasets import load_dataset
|
| 120 |
+
import json
|
| 121 |
+
|
| 122 |
+
# Load the full dataset (all 630 tasks, all 20 fields)
|
| 123 |
+
dataset = load_dataset("Spatialworld/Spatialworld-bench", split="train")
|
| 124 |
+
|
| 125 |
+
# Access a task - all fields are available
|
| 126 |
+
task = dataset[0]
|
| 127 |
+
print(f"Task: {task['task_id']} ({task['platform']})")
|
| 128 |
+
print(f"Instruction: {task['instruction']}")
|
| 129 |
+
print(f"Scene: {task['scene']}")
|
| 130 |
+
|
| 131 |
+
# Parse JSON-encoded fields
|
| 132 |
+
golden_actions = json.loads(task["golden_actions"])
|
| 133 |
+
success_conditions = json.loads(task["success_conditions"])
|
| 134 |
+
target_objects = json.loads(task["target_object_types"])
|
| 135 |
+
|
| 136 |
+
# Platform-specific fields (null if not applicable)
|
| 137 |
+
print(f"Category: {task['Category']}") # Only for ai2thor/procthor
|
| 138 |
+
print(f"Executor: {task['executor']}") # Only for carla/virtualhome
|
| 139 |
+
```
|
| 140 |
+
|
| 141 |
+
### Dataset Schema
|
| 142 |
+
|
| 143 |
+
| Field | Type | Description | Platforms |
|
| 144 |
+
|-------|------|-------------|-----------|
|
| 145 |
+
| `task_id` | string | Unique identifier | All |
|
| 146 |
+
| `task_name` | string | Human-readable name | All |
|
| 147 |
+
| `platform` | string | Platform name | All |
|
| 148 |
+
| `instruction` | string | Natural language instruction | All |
|
| 149 |
+
| `scene` | string | Scene identifier | ai2thor, carla, virtualhome |
|
| 150 |
+
| `max_steps` | int | Maximum steps | All |
|
| 151 |
+
| `golden_actions` | string (JSON) | Action sequence | All |
|
| 152 |
+
| `success_conditions` | string (JSON) | Success criteria | All |
|
| 153 |
+
| `target_object_types` | string (JSON) | Target objects | ai2thor, procthor |
|
| 154 |
+
| `success_logic` | string | AND/OR logic | ai2thor, procthor |
|
| 155 |
+
| `target_description` | string | Detailed description | ai2thor, procthor |
|
| 156 |
+
| `Category` | string | Task category | ai2thor, procthor |
|
| 157 |
+
| `Evaluation_Type` | string | Evaluation type | ai2thor, procthor |
|
| 158 |
+
| `Level` | string | Difficulty level | ai2thor, procthor |
|
| 159 |
+
| `executor` | string | Executor type | carla, virtualhome |
|
| 160 |
+
| `image_url` | string | Image path | carla, virtualhome |
|
| 161 |
+
| `input_modality` | string | Input type | carla, virtualhome |
|
| 162 |
+
| `origin_location` | bool | Origin flag | carla, virtualhome |
|
| 163 |
+
| `scene_index` | int | Scene number | procthor |
|
| 164 |
+
| `weather` | string | Weather condition | carla, virtualhome |
|
| 165 |
+
|
| 166 |
+
### Loading Original Tasks (Local)
|
| 167 |
+
|
| 168 |
+
For full benchmark with original JSON structures:
|
| 169 |
+
|
| 170 |
+
```python
|
| 171 |
+
import json
|
| 172 |
+
from pathlib import Path
|
| 173 |
+
|
| 174 |
+
def load_task(platform, task_id):
|
| 175 |
+
task_path = Path(f"benchmark/{platform}/tasks/{task_id}/task.json")
|
| 176 |
+
with open(task_path, 'r') as f:
|
| 177 |
+
return json.load(f)
|
| 178 |
+
|
| 179 |
+
# Example
|
| 180 |
+
task = load_task("ai2thor", "ai2thor00000")
|
| 181 |
+
print(task["instruction"])
|
| 182 |
+
print(task["golden_actions"]["actions"])
|
| 183 |
+
```
|
| 184 |
+
|
| 185 |
+
### Data Format
|
| 186 |
+
|
| 187 |
+
The Hugging Face dataset provides a unified schema across all platforms:
|
| 188 |
+
|
| 189 |
+
| Field | Type | Description |
|
| 190 |
+
|-------|------|-------------|
|
| 191 |
+
| `task_id` | string | Unique identifier (e.g., "ai2thor00000") |
|
| 192 |
+
| `platform` | string | Platform name (ai2thor/carla/procthor/virtualhome) |
|
| 193 |
+
| `task_name` | string | Human-readable task name |
|
| 194 |
+
| `instruction` | string | Natural language instruction |
|
| 195 |
+
| `scene` | string | Scene identifier (FloorPlan, Town, etc.) |
|
| 196 |
+
| `max_steps` | int | Maximum allowed steps |
|
| 197 |
+
| `golden_actions_json` | string | JSON-encoded golden action sequence |
|
| 198 |
+
| `success_conditions_json` | string | JSON-encoded success conditions |
|
| 199 |
+
| `target_object_types_json` | string | JSON-encoded target objects |
|
| 200 |
+
| `success_logic` | string | Logic for combining success conditions (AND/OR) |
|
| 201 |
+
| `target_description` | string | Detailed target description |
|
| 202 |
+
| `platform_specific_json` | string | Platform-specific fields (scene_index, executor, etc.) |
|
| 203 |
+
|
| 204 |
+
### Action Parsing
|
| 205 |
+
|
| 206 |
+
```python
|
| 207 |
+
import re
|
| 208 |
+
|
| 209 |
+
def parse_action(action_str):
|
| 210 |
+
"""Parse action string to (action_name, args)"""
|
| 211 |
+
match = re.match(r'^(\w+)\(([^)]*)\)$', action_str)
|
| 212 |
+
if match:
|
| 213 |
+
name = match.group(1)
|
| 214 |
+
args = [arg.strip() for arg in match.group(2).split(',')]
|
| 215 |
+
return name, args
|
| 216 |
+
return None, None
|
| 217 |
+
|
| 218 |
+
# Example
|
| 219 |
+
action = "Move(forward, 1.0)"
|
| 220 |
+
name, args = parse_action(action)
|
| 221 |
+
# name: "Move", args: ["forward", "1.0"]
|
| 222 |
+
```
|
| 223 |
+
|
| 224 |
+
## 📏 Evaluation
|
| 225 |
+
|
| 226 |
+
Tasks are evaluated based on:
|
| 227 |
+
|
| 228 |
+
1. **Success Rate**: Percentage of tasks completed successfully
|
| 229 |
+
2. **Action Efficiency**: Steps used vs. golden actions
|
| 230 |
+
3. **Goal Achievement**: Satisfaction of success conditions
|
| 231 |
+
|
| 232 |
+
### Success Conditions
|
| 233 |
+
|
| 234 |
+
- `object_state`: Target object in desired state
|
| 235 |
+
- `object_in_receptacle`: Object placed in correct container
|
| 236 |
+
- `polygon_area`: Agent reached target location
|
| 237 |
+
- `agent_near_object`: Agent within distance of target
|
| 238 |
+
|
| 239 |
+
## 📜 License
|
| 240 |
+
|
| 241 |
+
This dataset is released under CC BY-NC 4.0 (Creative Commons Attribution-NonCommercial 4.0 International).
|
| 242 |
+
|
| 243 |
+
|
| 244 |
+
---
|
| 245 |
+
|
| 246 |
+
**Note**: This is an anonymized version of the dataset prepared for peer review.
|
|
|
|
|
|
|
|
|
|
|
|