SpatialPIN: Enhancing Spatial Reasoning Capabilities of Vision-Language Models through Prompting and Interacting 3D Priors

Chenyang Ma, Kai Lu, Ta-Ying Cheng, Niki Trigoni, Andrew Markham

Introduction

While current Vision-Language Models (VLMs) like GPT-4o or LLaVA demonstrate impressive reasoning capabilities, they often remain spatially "blind." These models excel at identifying objects within a scene but struggle significantly with fine-grained 3D relationships. Tasks such as determining if a box is tilted at a specific angle or planning a collision-free 3D path for a robotic arm often fall outside their reliable capabilities.

The core issue is that current state-of-the-art models rely heavily on "surface-level associations" learned from massive 2D image-text datasets. They lack a fundamental, explicit understanding of 3D space. Furthermore, collecting and annotating high-quality 3D spatial data to train these models end-to-end is notoriously difficult and expensive.

To address this, researchers introduce SpatialPIN (Spatial Prompting and INteracting), a zero-shot, training-free framework designed to give existing VLMs 3D "superpowers." By feeding VLMs explicit 3D priors extracted from specialized foundation models, SpatialPIN enables complex spatial reasoning without requiring any additional model training.

SpatialPIN framework in action for robotic grasping and trajectory planning tasks.

Methodology: A Modular 3D Pipeline

SpatialPIN operates as a modular, "plug-and-play" pipeline that translates 2D pixels into structured 3D metadata that a VLM can easily interpret. The framework processes scenes through four main stages:

  1. 2D Image Understanding: The VLM first identifies objects in the scene. To handle occlusions—where one object partially hides another—the framework employs Language-Guided Segmentation (SAM) and Inpainting (LaMa) to create "occlusion-free" masks. This effectively allows the system to "imagine" the hidden parts of an object.
  2. Coarse 3D Scene Estimation: Using Metric Depth Estimation (ZoeDepth) and Perspective Fields, the system calculates the physical dimensions of the scene and the camera's viewing angle. This step "canonicalizes" the perspective, providing the VLM with crucial context about whether it is viewing a scene from the top, side, or an angle.
  3. Fine-Grained 3D Reconstruction: The framework utilizes a single-view 3D reconstruction model (One-2-3-45++) to generate detailed 3D meshes for each object. These meshes are then placed into a unified virtual 3D coordinate system via raycasting.
  4. The "Spatial Prompt": Instead of relying solely on the 2D image, the VLM is provided with a text-based summary of this reconstructed 3D world. This prompt includes precise coordinates, object sizes in centimeters, and principal axes (defining "up" or "front" for specific objects).

Experimental Setup and Datasets

The researchers evaluated SpatialPIN across a comprehensive mix of existing and newly introduced benchmarks to test various facets of spatial reasoning:

  • IaOR-VQA (Intra-Image Object Relations): Created using existing datasets like NOCS, RT-1, and BridgeData V2.
  • IaAD-VQA (Angular Discrepancies): A new benchmark focusing on object inclinations and tilts, utilizing the YCBInEOAT dataset.
  • IrSD-VQA (Spatial Dynamics): A challenging new "spot the difference" task requiring the VLM to reason about how objects moved or rotated between two distinct images.
  • Robotics Tasks: 51 custom simulated scenes were used to test practical downstream applications like "Pick and Stack" and 3D trajectory planning.

Key Insights

Several clever design choices drive SpatialPIN's success. First, it leverages the "free lunch" of foundation models. By treating 2D and 3D foundation models as modular tools, the framework extracts spatial knowledge and feeds it to a general-purpose VLM, bypassing the need to train a massive 3D-VLM from scratch.

Second, the framework recognizes that perspective ambiguity is a major failure point for VLMs. By explicitly defining the camera angle (e.g., "the camera is horizontal with a slight elevation"), SpatialPIN eliminates confusion between the 2D image plane's "up" and the real world's "up." Finally, using 2D inpainting as a proxy for 3D reconstruction allows the system to clean images so objects are processed in isolation, resulting in significantly more accurate 3D meshes.

Results

SpatialPIN demonstrated massive improvements over existing state-of-the-art models like SpatialVLM:

  • Qualitative VQA: On the IaOR-VQA benchmark, equipping GPT-4o with SpatialPIN boosted its accuracy from 69.0% to an impressive 87.3%.
  • Quantitative Precision: In tasks requiring precise numerical answers (e.g., estimating distance in centimeters), the improvement was dramatic. For GPT-4o, the percentage of answers falling within a tight accuracy range [90%, 111%] of the ground truth skyrocketed from 3.0% to 55.0%.
  • Robotics Success: In the simulated "Pick and Stack" task, SpatialPIN achieved a 36% success rate, more than tripling the 10% success rate of SpatialVLM. It successfully planned complex 3D trajectories for nuanced tasks like repositioning a coffee cup or inserting a toilet brush.

Limitations and Future Work

The primary bottleneck of the SpatialPIN framework is latency. The pipeline requires 3D reconstruction and multiple API calls to closed-source VLMs, taking roughly 20 seconds per image. While this makes it unsuitable for high-frequency, real-time reactive robotics (like catching a moving object), it is highly effective for high-level task and motion planning.

Additionally, because the model is training-free, its performance is inherently tied to the quality of the underlying 3D foundation models. However, this also means that as single-view 3D reconstruction models naturally improve, SpatialPIN will automatically become more accurate. Future work aims to explore tighter integration with real-time control loops and expand the framework's ability to handle complex, articulated objects.

Summary updated

BibTeX
@inproceedings{ma2024spatialpin,
  author = {Chenyang Ma and Kai Lu and Ta-Ying Cheng and Niki Trigoni and Andrew Markham},
  title = {{SpatialPIN: Enhancing Spatial Reasoning Capabilities of Vision-Language Models through Prompting and Interacting 3D Priors}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=YTHJ8O6SCB},
}
Figure