SpatialDETR: Robust Scalable Transformer-Based 3D Object Detection From Multi-view Camera Images With Global Cross-Sensor Attention

Simon Doll, Richard Schulz, Lukas Schneider, Viviane Benzin, Markus Enzweiler, Hendrik P. A. LenschECCV 2022

Abstract

SpatialDETR is a novel 3D object detection framework designed for multi-view camera systems. It addresses the fundamental challenges of 3D detection from 2D images by introducing global, cross-sensor attention. By incorporating a geometric positional encoding that explicitly models camera optics and extrinsics, SpatialDETR allows object queries to integrate information across disparate camera boundaries. This approach significantly enhances the detection of large vehicles, such as trucks and buses, which often span multiple sensors. On the nuScenes benchmark, SpatialDETR achieves state-of-the-art performance among camera-only methods, demonstrating the power of geometry-aware global attention.

Introduction

3D object detection from 2D camera images is a critical component of autonomous driving systems. However, the inherent "loss of dimension" during the projection of a 3D scene onto 2D sensors poses a significant challenge. While LiDAR provides direct depth measurements, camera-only systems offer a cost-effective alternative with higher refresh rates.

SpatialDETR utilizes geometric positional encoding to enable global cross-sensor attention across multi-view camera setups.

Previous transformer-based approaches, such as DETR3D, attempted to bridge this gap by projecting 3D object queries into 2D image space. However, these methods typically relied on local feature sampling at the query center. This localized approach often fails to capture the global context necessary for detecting large objects that might span multiple cameras or occupy a significant portion of a single frame. SpatialDETR overcomes this by enabling global cross-sensor attention, allowing queries to attend to any relevant pixel across the entire multi-camera suite.

Methodology

SpatialDETR is an object-centric framework built upon the Detection Transformer (DETR) architecture. Its primary innovations focus on integrating spatial geometry into the attention mechanism.

Geometric Positional Encoding

Unlike standard transformers that use generic sine/cosine functions for positional encoding, SpatialDETR utilizes the actual 3D geometry of the sensor suite. It computes normalized 3D direction vectors (view rays) for every pixel based on the cameras' intrinsic and extrinsic parameters. This "spatially-aware" encoding provides the model with an explicit understanding of the physical relationships between pixels across different cameras.

Spatially-Aware Cross-Attention and Value Projection

To facilitate dot-product attention across disparate coordinate systems, the model projects 3D object queries into each camera's local frame. Furthermore, because image patches from different cameras reside in different coordinate spaces, SpatialDETR employs a sub-network to estimate depth for each feature patch. This allows the transformation of 2D image features into a unified 3D reference system before updating object queries.

Overview of the SpatialDETR architecture, featuring shared ResNet backbones and a transformer decoder with cross-attention modules.

Decoder-Only Architecture

SpatialDETR adopts a decoder-only design, omitting the heavy encoder found in the original DETR. This architectural choice ensures that the model scales linearly with image resolution, maintaining computational efficiency for high-resolution multi-camera configurations.

Experimental Evaluation

The model was evaluated on the nuScenes dataset, a comprehensive autonomous driving benchmark consisting of 1,000 scenes. The sensor suite includes six cameras providing a full 360-degree field of view.

Key Results

SpatialDETR achieved state-of-the-art performance on the nuScenes benchmark for camera-only methods:

  • Overall Metrics: The model reached a mean Average Precision (mAP) of 0.351 and a nuScenes Detection Score (NDS) of 0.425 on the validation set.
  • Large Object Detection: Significant improvements were observed for extended objects compared to the DETR3D baseline, with Average Precision gains of +1.6% for trucks and +3.1% for buses.
  • Efficiency: Despite the complexity of global attention, the model maintains a competitive runtime of approximately 2.4 FPS on a single NVIDIA V100 GPU.

Discussion and Insights

The success of SpatialDETR highlights several key principles in 3D vision:

  • Geometry as an Inductive Bias: Providing view-ray geometry as a positional encoding serves as a powerful hint, making the model more robust to varying sensor configurations without requiring it to learn the layout from scratch.
  • Benefits of Global Attention: Global attention is particularly advantageous for large-scale objects. By processing the entire scene simultaneously, the model can effectively fuse features from the front and rear of a vehicle, even when they appear in separate camera views.
  • Implicit 3D Representation: By estimating depth to align features without generating an explicit point cloud, SpatialDETR finds an efficient middle ground between 2D-centric and 3D-centric detection methods.

Limitations and Future Work

While effective, SpatialDETR shows slightly lower sensitivity to very small objects, such as pedestrians, likely due to the use of single-scale feature maps. Future iterations could incorporate multi-scale feature pyramids (FPN) to address this. Additionally, the model's reliance on precise camera calibration suggests that "online calibration" mechanisms could improve robustness to sensor misalignments. Finally, the view-ray formulation is inherently scalable, offering potential for unified multi-modal transformers incorporating LiDAR or Radar data.

Summary updated

BibTeX
@inproceedings{doll2022spatialdetr,
  author = {Simon Doll and Richard Schulz and Lukas Schneider and Viviane Benzin and Markus Enzweiler and Hendrik P. A. Lensch},
  title = {{SpatialDETR: Robust Scalable Transformer-Based 3D Object Detection From Multi-view Camera Images With Global Cross-Sensor Attention}},
  booktitle = {European Conference on Computer Vision},
  year = {2022},
  doi = {10.1007/978-3-031-19842-7\_14},
}
Figure