---
license_name: qwen-research
license_link: https://huggingface.co/Qwen/Qwen2.5-VL-3B-Instruct/blob/main/LICENSE
datasets:
- remyxai/SpaceThinker
base_model:
- UCSC-VLAA/VLAA-Thinker-Qwen2.5VL-3B
tags:
- remyx
- qwen2.5-vl
- spatial-reasoning
- multimodal
- vlm
- vqasynth
- thinking
- reasoning
- test-time-compute
- robotics
- embodied-ai
- quantitative-spatial-reasoning
- distance-estimation
- visual-question-answering
language:
- en
pipeline_tag: image-text-to-text
library_name: transformers
model-index:
- name: SpaceThinker-Qwen2.5VL-3B
  results:
  - task:
      type: visual-question-answering
      name: Spatial Reasoning
    dataset:
      name: Q-Spatial-Bench
      type: custom
    metrics:
    - type: success_rate
      name: Overall Success Rate
      value: 0.3226
    results_by_distance_bucket:
    - name: 0-10cm
      count: 7
      successes: 3
      success_rate: 0.4286
    - name: 10-30cm
      count: 28
      successes: 5
      success_rate: 0.1786
    - name: 30-60cm
      count: 16
      successes: 8
      success_rate: 0.5
    - name: 60-100cm
      count: 17
      successes: 9
      success_rate: 0.5294
    - name: 100-200cm
      count: 19
      successes: 4
      success_rate: 0.2105
    - name: 200cm+
      count: 6
      successes: 1
      success_rate: 0.1667
  - task:
      type: visual-question-answering
      name: Spatial Reasoning
    dataset:
      name: 3DSRBench
      type: benchmark
    metrics:
    - type: success_rate
      name: Overall Success Rate
      value: 0.2052
    results_by_category:
    - name: 3D Positional Relation / Orientation
      success_rate: 0.2603
    - name: Object Localization / 3D Localization
      success_rate: 0.3493
    - name: Object Properties / Size
      success_rate: 0.0058
  - task:
      type: visual-question-answering
      name: Spatial Reasoning
    dataset:
      name: BLINK
      type: benchmark
    metrics:
    - type: success_rate
      name: Overall Success Rate
      value: 0.2841
    results_by_category:
    - name: 3D Positional Relation / Orientation
      success_rate: 0.5874
    - name: Counting / Object Counting
      success_rate: 0.45
    - name: Depth and Distance / Relative
      success_rate: 0
    - name: Object Localization / 2D Localization
      success_rate: 0.041
    - name: Point and Object Tracking / Point Correspondence
      success_rate: 0.0581
  - task:
      type: visual-question-answering
      name: Spatial Reasoning
    dataset:
      name: MMIU
      type: benchmark
    metrics:
    - type: success_rate
      name: Overall Success Rate
      value: 0.2651
    results_by_category:
    - name: Camera and Image Transformation / 2D Transformation
      success_rate: 0.1325
    - name: Camera and Image Transformation / 3D Camera Pose
      success_rate: 0.28
    - name: Camera and Image Transformation / Camera Motion
      success_rate: 0.4436
    - name: Depth and Distance / Absolute
      success_rate: 0.005
    - name: Object Localization / 3D Localization
      success_rate: 0.2275
    - name: Point and Object Tracking / 3D Tracking
      success_rate: 0.505
    - name: Point and Object Tracking / Point Correspondence
      success_rate: 0.265
  - task:
      type: visual-question-answering
      name: Spatial Reasoning
    dataset:
      name: MMVP
      type: benchmark
    metrics:
    - type: success_rate
      name: Overall Success Rate
      value: 0.5367
    results_by_category:
    - name: Others / Miscellaneous
      success_rate: 0.5367
  - task:
      type: visual-question-answering
      name: Spatial Reasoning
    dataset:
      name: QSpatialBench-Plus
      type: benchmark
    metrics:
    - type: success_rate
      name: Overall Success Rate
      value: 0.5149
    results_by_category:
    - name: Depth and Distance / Absolute
      success_rate: 0.5149
  - task:
      type: visual-question-answering
      name: Spatial Reasoning
    dataset:
      name: QSpatialBench-ScanNet
      type: benchmark
    metrics:
    - type: success_rate
      name: Overall Success Rate
      value: 0.5733
    results_by_category:
    - name: Depth and Distance / Absolute
      success_rate: 0.48
    - name: Object Properties / Size
      success_rate: 0.6667
  - task:
      type: visual-question-answering
      name: Spatial Reasoning
    dataset:
      name: RealWorldQA
      type: benchmark
    metrics:
    - type: success_rate
      name: Overall Success Rate
      value: 0.5699
    results_by_category:
    - name: Others / Miscellaneous
      success_rate: 0.5699
  - task:
      type: visual-question-answering
      name: Spatial Reasoning
    dataset:
      name: SpatialSense
      type: benchmark
    metrics:
    - type: success_rate
      name: Overall Success Rate
      value: 0.6405
    results_by_category:
    - name: 3D Positional Relation / Orientation
      success_rate: 0.6405
  - task:
      type: visual-question-answering
      name: Spatial Reasoning
    dataset:
      name: VGBench
      type: benchmark
    metrics:
    - type: success_rate
      name: Overall Success Rate
      value: 0.3257
    results_by_category:
    - name: Camera and Image Transformation / 2D Transformation
      success_rate: 0.2258
    - name: Camera and Image Transformation / 3D Camera Pose
      success_rate: 0.401
    - name: Depth and Distance / Absolute
      success_rate: 0.3904
    - name: Depth and Distance / Relative
      success_rate: 0.2127
    - name: Object Localization / 3D Localization
      success_rate: 0.4217
    - name: Point and Object Tracking / 3D Tracking
      success_rate: 0.3027
  - task:
      type: visual-question-answering
      name: Spatial Reasoning
    dataset:
      name: VSI-Bench_8
      type: benchmark
    metrics:
    - type: success_rate
      name: Overall Success Rate
      value: 0.2781
    results_by_category:
    - name: 3D Positional Relation / Orientation
      success_rate: 0.3864
    - name: Counting / Object Counting
      success_rate: 0.2246
    - name: Depth and Distance / Absolute
      success_rate: 0.0639
    - name: Depth and Distance / Relative
      success_rate: 0.3479
    - name: Object Properties / Size
      success_rate: 0.143
    - name: Others / Miscellaneous
      success_rate: 0.3042
  - task:
      type: visual-question-answering
      name: Spatial Reasoning
    dataset:
      name: VSR-ZeroShot
      type: benchmark
    metrics:
    - type: success_rate
      name: Overall Success Rate
      value: 0.6997
    results_by_category:
    - name: 3D Positional Relation / Orientation
      success_rate: 0.6997
  - task:
      type: visual-question-answering
      name: Spatial Reasoning
    dataset:
      name: cvbench
      type: benchmark
    metrics:
    - type: success_rate
      name: Overall Success Rate
      value: 0.2457
    results_by_category:
    - name: Counting / Object Counting
      success_rate: 0.4886
    - name: Depth and Distance / Relative
      success_rate: 0.2025
    - name: Object Localization / 3D Localization
      success_rate: 0.0462
  - task:
      type: visual-question-answering
      name: Spatial Reasoning
    dataset:
      name: spatialbench
      type: benchmark
    metrics:
    - type: success_rate
      name: Overall Success Rate
      value: 0.565
    results_by_category:
    - name: 3D Positional Relation / Orientation
      success_rate: 0.5
    - name: Counting / Object Counting
      success_rate: 0.7
    - name: Object Properties / Existence
      success_rate: 0.825
    - name: Object Properties / Reachability
      success_rate: 0.575
    - name: Object Properties / Size
      success_rate: 0.225
new_version: remyxai/SpaceOm
---


[![Official](https://img.shields.io/badge/Official-%239a0018.svg?logo=data:image/svg+xml;base64, )](https://remyx.ai/?model_id=SpaceThinker-Qwen2.5VL-3B&sha256=abc123def4567890abc123def4567890abc123def4567890abc123def4567890)

# SpaceThinker-Qwen2.5VL-3B

![image/gif](https://cdn-uploads.huggingface.co/production/uploads/647777304ae93470ffc28913/eQs51cR-mwGDGhJ0YVHlO.gif)


## 📚 Contents

- [🚀 Try It Live](#try-the-spacethinker-space)
- [🧠 Model Overview](#model-overview)
- [📏 Quantitative Spatial Reasoning](#spatial-reasoning-capabilities)
- [🔍 View Examples](#examples-of-spacethinker)
- [📊 Evaluation & Benchmarks](#model-evaluation)
- [🏃‍♀️ Running SpaceThinker](#running-spacethinker)
- [🏋️‍♂️ Training Configuration](#training-spacethinker)
- [📂 Dataset Info](#spacethinker-dataset)
- [⚠️ Limitations](#limitations)
- [📜 Citation](#citation)


## Try the SpaceThinker Space

[![Try the SpaceThinker Space](https://img.shields.io/badge/🤗%20Spaces-Demo-blue)](https://huggingface.co/spaces/remyxai/SpaceThinker-Qwen2.5VL-3B)


# Model Overview

**SpaceThinker-Qwen2.5VL-3B** is a thinking/reasoning multimodal/vision-language model (VLM) trained to enhance spatial reasoning with test-time compute by fine-tuning 
`UCSC-VLAA/VLAA-Thinker-Qwen2.5VL-3B` on synthetic reasoning traces generated by the [VQASynth](https://huggingface.co/datasets/remyxai/SpaceThinker) pipeline.


- **Model Type:** Multimodal, Vision-Language Model
- **Architecture**: `Qwen2.5-VL-3B`
- **Model Size:** 3.75B parameters (FP16)
- **Finetuned from:** `UCSC-VLAA/VLAA-Thinker-Qwen2.5VL-3B`
- **Finetune Strategy:** LoRA (Low-Rank Adaptation)
- **License:** Apache-2.0

Check out the [SpaceThinker collection](https://huggingface.co/collections/remyxai/spacethinker-68014f174cd049ca5acca4e5)

## Spatial Reasoning Capabilities

Strong quantitative spatial reasoning is critical for embodied AI applications demanding the ability to plan and navigate a 3D space, such as robotics and drones.
**SpaceThinker** improves capabilities using test-time compute, trained with samples which ground the final response on a consistent explanation of a collection of scene observations.

- Enhanced Quantitative Spatial Reasoning (e.g., distances, sizes)
- Grounded object relations (e.g., left-of, above, inside)

### Examples of SpaceThinker

Consider the following sample images/prompts for visual QA of **SpaceThinker-Qwen2.5VL-3B**

| <img src="images/example_1.jpg"  alt="sample_1" style="max-height: 350px;" > | <img src="images/example_2.png"  alt="sample_2" style="max-height: 350px;"> | <img src="images/example_3.png" alt="sample_3" style="max-height: 350px;"> |
|----------|-------------|--------|
| **Prompt:** How far is the man in the red hat from the pallet of boxes in feet? | **Prompt:** How far is the Goal from the penalty taker in this image? | **Prompt:** Approximately how many meters apart are the chair and bookshelf? |
| **Reasoning:** To determine how far the man in the red hat is from the pallet of boxes, I need to consider the spatial arrangement in the warehouse. The man is walking on the floor, and there's a visible gap between him and the pallet. First, I'll estimate the size of the pallet. A standard pallet is typically around 4 feet wide and 8 feet long. Given that the man is standing near the edge of the pallet, he might be about 2–3 feet away from the front edge of the pallet. Next, I'll consider the distance from the pallet to the man. The man appears to be walking along the aisle, which seems to be about 6–7 feet wide. If he is standing at the edge of the pallet, he would likely be about 2–3 feet from the front edge of the pallet. Combining these observations, the man in the red hat is approximately 2–3 feet from the pallet of boxes. | **Reasoning:** First, I observe the scene where a player in a red uniform stands near the goal. The goal itself is a standard soccer goalpost, which typically extends 2.5 meters beyond the line of the goalposts. The player appears to be standing close to the goal, but not directly at the goal line. To estimate the distance, I consider that the player's position relative to the goal suggests he is likely standing closer than 2.5 meters away. Given the typical setup of a penalty kick scenario, the player would be positioned further back from the goal than the goal itself. By visual estimation, the player seems to be standing approximately 10–15 meters from the goal. This range aligns with the common distance for a penalty kick, considering the player's stance and the goal's structure. Thus, the distance from the goal to the penalty taker is likely around 10–15 meters. | **Reasoning:** To determine the distance between the chair and the bookshelf, I'll consider the typical dimensions of these objects. A standard office chair is around 60–70 cm tall, and a bookshelf can be anywhere from 1.2 to 1.8 meters tall. Given that the chair is likely placed on a desk or floor level, the height difference between the chair and the top of the bookshelf would be approximately 1 meter. Assuming the bookshelf is at least 1 meter high, and the chair is at ground level, the vertical distance between them is indeed 1 meter. The horizontal distance might vary depending on the layout, but given the room's dimensions and the placement of the chair relative to the bookshelf, the total distance between the chair and the top of the bookshelf is likely around 1 meter. Therefore, the chair and bookshelf are approximately 1 meter apart. |
| **Answer:** 2–3 feet | **Answer:** 10–15 meters | **Answer:** 1 meter |


> **SpaceThinker** demonstrates grounded, quantitative spatial reasoning—inferring accurate distances, interpreting 3D scene context, and formatting open-ended answers precisely
> by integrating visual cues, real-world object priors, and human-centric spatial logic.

Read more about using test-time compute [here](https://huggingface.co/spaces/open-r1/README/discussions/10) for enhanced multimodal quantitative spatial reasoning.

## Running SpaceThinker 

### Space
Try the **SpaceThinker** Space 

[![Try the SpaceThinker Space](https://img.shields.io/badge/🤗%20Spaces-Demo-blue)](https://huggingface.co/spaces/remyxai/SpaceThinker-Qwen2.5VL-3B)

### Ollama
To launch with ollama, run:
```bash
ollama run hf.co/remyxai/SpaceThinker-Qwen2.5VL-3B:latest
```
or 
```bash
ollama run remyxai/spacethinker
```

### llama.cpp
To run locally with **llama.cpp**, install and build this [branch](https://github.com/HimariO/llama.cpp.qwen2.5vl/tree/qwen25-vl) and download the [.gguf weights here](https://huggingface.co/remyxai/SpaceThinker-Qwen2.5VL-3B/tree/main/gguf)

```bash
./llama-qwen2vl-cli -m spacethinker-qwen2.5VL-3B-F16.gguf
--mmproj spacethinker-qwen2.5vl-3b-vision.gguf
--image images/example_1.jpg --threads 24 -ngl 9
-p "Does the man in blue shirt working have a greater \\
height compared to the wooden pallet with boxes on floor?" 
```

Run using **llama.cpp in colab**

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1_ShhJAqnac8L4N9o1YNdsxCksSLJCrU7?usp=sharing)

### Transformers
Run locally using **Transformers**

```python
import torch
from PIL import Image
from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor
import requests
from io import BytesIO

# Configuration
model_id = "remyxai/SpaceThinker-Qwen2.5VL-3B"
image_path = "images/example_1.jpg"  # or local path
prompt = "What can you infer from this image about the environment?"
system_message = (
  "You are VL-Thinking 🤔, a helpful assistant with excellent reasoning ability. "
  "You should first think about the reasoning process and then provide the answer. "
  "Use <think>...</think> and <answer>...</answer> tags."
)

# Load model and processor
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
    model_id, device_map="auto", torch_dtype=torch.bfloat16
)
processor = AutoProcessor.from_pretrained(model_id)

# Load and preprocess image
if image_path.startswith("http"):
    image = Image.open(BytesIO(requests.get(image_path).content)).convert("RGB")
else:
    image = Image.open(image_path).convert("RGB")
if image.width > 512:
    ratio = image.height / image.width
    image = image.resize((512, int(512 * ratio)), Image.Resampling.LANCZOS)

# Format input
chat = [
    {"role": "system", "content": [{"type": "text", "text": system_message}]},
    {"role": "user", "content": [{"type": "image", "image": image},
                                {"type": "text", "text": prompt}]}
]
text_input = processor.apply_chat_template(chat, tokenize=False,
                                                  add_generation_prompt=True)

# Tokenize
inputs = processor(text=[text_input], images=[image],
                                      return_tensors="pt").to("cuda")

# Generate response
generated_ids = model.generate(**inputs, max_new_tokens=1024)
output = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]

print("Response:\n", output)
```


## SpaceThinker Dataset

The **SpaceThinker** dataset includes over 12K samples synthesized using VQASynth on a subset of images in the localized narratives split of [the cauldron](https://huggingface.co/datasets/HuggingFaceM4/the_cauldron).
**SpaceThinker** is formatted similar to the [Llama-Nemotron-Post-Training-Dataset-v1](https://huggingface.co/datasets/nvidia/Llama-Nemotron-Post-Training-Dataset) to toggle reasoning.


The model builds upon the ideas from [SpatialVLM (Chen et al., 2024)](https://spatial-vlm.github.io/), introducing synthetic reasoning traces grounded on a 3D scene reconstruction pipeline using **Molmo, VGGT, SAM2**.

![image/png](https://cdn-uploads.huggingface.co/production/uploads/647777304ae93470ffc28913/Tkq_jIfD1YizSZBGdJY53.png)

**Dataset Summary**
- ~12K synthetic spatial reasoning traces
- Question types: spatial relations (distances (units), above, left-of, contains, closest to)
- Format: image (RGB) + question + answer with reasoning traces
- Dataset: [remyxai/SpaceThinker](https://huggingface.co/datasets/remyxai/SpaceThinker)
- Code: [Synthetize Spatial Reasoning Traces with VQASynth](https://github.com/remyxai/VQASynth)


## Training SpaceThinker

**PEFT Configuration**
- Architecture: Qwen2.5-VL-3B
- Base model: UCSC-VLAA/VLAA-Thinker-Qwen2.5VL-3B
- Method: LoRA finetuning (PEFT)
- LoRA Alpha: 256
- LoRA Rank: 128
- Target Modules: q_proj, v_proj
- Optimizer: AdamW (lr=2e-5), batch size = 1, epochs = 3
- Max input length: 1024 tokens

Reproduce LoRA SFT training with included script:
```bash
python train.py
```
Wandb logs available [here](https://wandb.ai/smellslikeml/qwen2.5-3b-instruct-trl-sft-spacethinker).


## Model Evaluation

### OmniSpatial

See how SpaceThinker compares on **[OmniSpatial](https://www.arxiv.org/pdf/2506.03135)** - dynamic reasoning, complex spatial logic, spatial interaction, and perspective-taking.

![image/png](https://cdn-uploads.huggingface.co/production/uploads/647777304ae93470ffc28913/ppsNcMghSjdSlJtybzceb.png)

### SpatialScore  

Evaluate Spatial Reasoning with the **SpatialScore**  Benchmark.

![image/png](https://cdn-uploads.huggingface.co/production/uploads/647777304ae93470ffc28913/XMs9hntlWXJeO_sH7GZ-P.png)

Evaluate **SpaceThinker** on the [SpatialScore](https://haoningwu3639.github.io/SpatialScore/) benchmarks for general spatial reasoning in the following colab notebook:

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1eRc5_vpUCS4QxwzBNAvKi0z0IANdC9N2?usp=sharing)

The following chart compares performance between **SpaceThinker** and **SpaceQwen** on the **SpatialScore** benchmarks sources.

<img src="https://cdn-uploads.huggingface.co/production/uploads/647777304ae93470ffc28913/HYR3temzQ8YjdKQWTtjxt.png" alt="SpaceThinker_v_SpaceQwen" style="max-height: 250px;">

Find the full summary of the [results here](https://huggingface.co/datasets/salma-remyx/SpaceThinker_SpatialScore).

**SpaceThinker** shines on the **SpatialScore-Hard** split:

| **Model**           | **Overall** | **Count.** | **Obj-Loc.** | **Pos-Rel.** | **Dist.** | **Obj-Prop.** | **Cam.\&IT.** | **Tracking** | **Others** |
| ------------------- | ----------- | ---------- | ------------ | ------------ | --------- | ------------- | ------------- | ------------ | ---------- |
| SpaceOm             | 18.83       | 17.11      | 12.57        | 21.50        | 23.66     | 31.94         | 18.86         | 14.79        | 9.14       |
| 🧠 **SpaceThinker** | 19.47       | 17.82      | 12.57        | 21.50        | 25.37     | 30.23         | 22.86         | 14.79        | 9.71       |
| SpaceQwen2.5VL-3B   | 17.21       | 20.42      | 18.86        | 27.10        | 6.86      | 12.57         | 8.57          | 23.08        | 18.86      |
| SpatialBot-Phi2-3B  | 19.87       | 19.72      | 27.59        | 25.23        | 8.00      | 23.43         | 13.71         | 17.16        | 22.86      |
| Kimi-VL-3B          | 16.29       | 12.68      | 18.86        | 12.62        | 17.71     | 22.29         | 18.86         | 11.83        | 15.43      |
| Kimi-VL-3B-Thinking | 26.36       | 19.72      | 28.00        | 38.79        | 27.43     | 32.57         | 14.86         | 18.34        | 26.86      |
| Qwen2.5-VL-3B       | 16.86       | 18.31      | 7.43         | 16.82        | 19.43     | 31.43         | 15.43         | 14.79        | 11.43      |
| InternVL2.5-4B      | 13.71       | 6.34       | 21.71        | 15.42        | 14.86     | 12.00         | 16.00         | 12.43        | 9.14       |


See [all results](https://huggingface.co/datasets/salma-remyx/SpaceThinker_SpatialScore-Hard/blob/main/all_results.json) for **SpatialScore-Hard**.


### SpaCE-10



| **Model**                | **Overall** | **EQ**   | **SQ**   | **SA**   | **OO**   | **OS**   | **EP**   | **FR**   | **SP**   | **Source**  |
|--------------------------|-------------|----------|----------|----------|----------|----------|----------|----------|----------|-------------|
| InternVL2.5-4B           | **36.01**   | **34.30**| 34.40    | 43.60    | 44.40    | 16.50    | **31.10**| **50.10**| **33.70**| Table       |
| 🧠**SpaceThinker**       | 32.72       | 32.73    | 24.81    | 47.26    | 50.33    | 33.63    | 9.25     | 37.54    | 26.25    | GPT Eval    |
| SpaceOm                  | 32.32       | 32.47    | 24.81    | **47.63**| 50.00    | 32.52    | 9.12     | 37.04    | 25.00    | GPT Eval    |
| SpaceQwen                | 31.98       | 31.19    | 25.89    | 41.61    | **51.98**| **35.18**| 10.97    | 36.54    | 22.50    | GPT Eval    |
| Qwen2.5-VL-3B-Instruct   | 30.00       | 31.70    | **45.50**| 39.00    | 43.00    | 25.30    | 11.50    | 22.80    | 21.20    | Table       |

**Legend:**
- EQ: Entity Quantification
- SQ: Scene Quantification
- SA: Size Assessment
- OO: Object-Object spatial relations
- OS: Object-Scene spatial relations
- EP: Entity Presence
- FR: Functional Reasoning
- SP: Spatial Planning

> ℹ️ Note: Scores for SpaceQwen, SpaceThinker, SpaceOm are generated via `gpt_eval_score` on single-choice (`*-single`) versions of the SpaCE-10 benchmark tasks. Other entries reflect leaderboard accuracy scores from the official SpaCE-10 evaluation table.

Read more about the [SpaCE-10 benchmark](https://arxiv.org/pdf/2506.07966v1) or see [results here](https://huggingface.co/datasets/salma-remyx/SpaceThinker_SpaCE-10_Results/blob/main/20250612_062336_results.json)

## QSpatial++ Comparison Table (4/25/25)

| **Model**          | **SpaceThinker-Qwen2.5VL-3B**                                                                                                               | **gpt-4o**                                                                                                               | **gemini-2.5-pro-preview-03-25**                                                                                                 |
|------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------|
| **QSpatial++ Predictions**      | <img src="https://cdn-uploads.huggingface.co/production/uploads/647777304ae93470ffc28913/W4b6fV0AxT6GsYR1XiQvA.png" alt="SpaceThinker sample" style="max-height: 150px;"> | <img src="https://cdn-uploads.huggingface.co/production/uploads/647777304ae93470ffc28913/j_NFQ9Lns8ON9Rzg3Fs0r.png" alt="gpt-4o sample" style="max-height: 150px;"> | <img src="https://cdn-uploads.huggingface.co/production/uploads/647777304ae93470ffc28913/Ot64jVvwdldpCuDr-6PjX.png" alt="Gemini sample" style="max-height: 150px;"> |
| **Colab Notebook**     | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1buEe2QC4_pnrJwQ9XyRAH7RfaIa6pbex?usp=sharing) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1zNv41ONUeoaEigscz9muZ3eVFtxev0qv?usp=sharing) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/153bbTxrRBH52n74jONvpsbqJ1XYNByKw?usp=sharing) |
| **Success Rate (%) ↑** | **55**                                                                                                                                       | 43                                                                                                                       | 52                                                                                                                               |
| **Samples Completed ↑**| **99 / 100**                                                                                                                                | 95 / 100                                                                                                                 | **99 / 100**                                                                                                                         |
| **sMAPE (%) ↓**        | 66                                                                                                                                           | 71                                                                                                                       | **62**                                                                                                                           |

### Metric Notes
- **Success Rate (%)**: Higher is better ↑  
- **Samples Completed**: Higher is better ↑  
- **sMAPE (%)**: Lower is better ↓

Try distance estimation focusing on **Q-Spatial-Bench** in the colab notebook here:

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1NH2n-PRJJOiu_md8agyYCnxEZDGO5ICJ?usp=sharing)

The [Q-Spatial-Bench dataset](https://huggingface.co/datasets/andrewliao11/Q-Spatial-Bench) includes hundreds of
VQA samples designed to evaluate quantitative spatial reasoning of VLMs with high-precision.

![image/png](https://cdn-uploads.huggingface.co/production/uploads/647777304ae93470ffc28913/F2W6YkVdsNva0EpMGRtjh.png)

Using the Colab notebook we evaluate **SpaceThinker** on the **QSpatial++** split under two conditions:


- **Default System Prompt**:  
  - Prompts completed: **93 / 101**  
  - Correct answers: **30**  
  - **Accuracy**: **32.26%**

- **Prompting for step-by-step reasoning** using the [spatial prompt](https://github.com/andrewliao11/Q-Spatial-Bench-code/blob/main/prompt_templates/spatial_prompt_steps.txt) from **Q-Spatial-Bench**:  
  - Correct answers: **53**  
  - **Accuracy**: **52.48%**

Using the spatial prompt improves the number of correct answers and overall accuracy rate while improving the task completion rate.

Updating the comparison from **Q-Spatial-Bench** [project page](https://andrewliao11.github.io/spatial_prompt/), the **SpaceThinker-Qwen2.5-VL-3B** VLM using 
the SpatialPrompt for step-by-step reasoning performs on par with larger, closed, frontier API providers.


The following chart makes further comparisons to assess prompt sensitivity by evaluating w/o the benefit of the 
optimized step-by-step instructions. This comparison helps to quantify the effect of reasoning versus non-reasoning
models as well as that of SFT by LoRA with synthetic spatial reasoning data.


![image/png](https://cdn-uploads.huggingface.co/production/uploads/647777304ae93470ffc28913/H6GlJLkqIalHtMw5Ij4nJ.png)

Consider the extended [comparisons here](https://huggingface.co/datasets/salma-remyx/Q-Spatial-Bench-sMAPE-Comparison) sweeping additional model sizes and architectures.

## Limitations

- Performance may degrade in cluttered environments or camera perspective.
- This model was fine-tuned using synthetic reasoning over an internet image dataset.
- Multimodal biases inherent to the base model (Qwen2.5-VL) may persist.
- Not intended for use in safety-critical or legal decision-making.

> Users are encouraged to evaluate outputs critically and consider fine-tuning for domain-specific safety and performance. Distances estimated using autoregressive
> transformers may help in higher-order reasoning for planning and behavior but may not be suitable replacements for measurements taken with high-precision sensors,
> calibrated stereo vision systems, or specialist monocular depth estimation models capable of more accurate, pixel-wise predictions and real-time performance.


## Citation

![image/png](https://cdn-uploads.huggingface.co/production/uploads/647777304ae93470ffc28913/cbScrdqGH4ZITjK5qZPYQ.png)

```
@article{chen2024spatialvlm,
  title = {SpatialVLM: Endowing Vision-Language Models with Spatial Reasoning Capabilities},
  author = {Chen, Boyuan and Xu, Zhuo and Kirmani, Sean and Ichter, Brian and Driess, Danny and Florence, Pete and Sadigh, Dorsa and Guibas, Leonidas and Xia, Fei},
  journal = {arXiv preprint arXiv:2401.12168},
  year = {2024},
  url = {https://arxiv.org/abs/2401.12168},
}

@misc{qwen2.5-VL,
  title = {Qwen2.5-VL},
  url = {https://qwenlm.github.io/blog/qwen2.5-vl/},
  author = {Qwen Team},
  month = {January},
  year = {2025}
}

@misc{vl-thinking2025,
  title={SFT or RL? An Early Investigation into Training R1-Like Reasoning Large Vision-Language Models },
  author={Hardy Chen and Haoqin Tu and Fali Wang and Hui Liu and Xianfeng Tang and Xinya Du and Yuyin Zhou and Cihang Xie},
  year = {2025},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/UCSC-VLAA/VLAA-Thinking}},
}

@inproceedings{
  liaos2024reasoning,
  title={Reasoning Paths with Reference Objects Elicit Quantitative Spatial Reasoning in Large Vision-Language Models},
  author={Yuan-Hong Liao and Rafid Mahmood and Sanja Fidler and David Acuna},
  booktitle={The 2024 Conference on Empirical Methods in Natural Language Processing},
  year={2024},
  url={https://arxiv.org/abs/2409.09788},
}

@article{wu2025spatialscore,
    author    = {Wu, Haoning and Huang, Xiao and Chen, Yaohui and Zhang, Ya and Wang, Yanfeng and Xie, Weidi},
    title     = {SpatialScore: Towards Unified Evaluation for Multimodal Spatial Understanding},
    journal   = {arXiv preprint arXiv:2505.17012},
    year      = {2025},
}

@article{omnispatial25,
  title   = {OmniSpatial: Towards Comprehensive Spatial Reasoning Benchmark for Vision Language Models},
  author  = {Mengdi Jia and Zekun Qi and Shaochen Zhang and Wenyao Zhang and Xinqiang Yu and Jiawei He and He Wang and Li Yi},
  journal = {arXiv preprint arXiv:2506.03135},
  year = {2025}
}
```