Attention-Based Depth Distillation with 3D-Aware Positional Encoding for Monocular 3D Object Detection

Zizhang Wu, Yunzhe Wu, Jian Pu, Xianzhi Li, Xiaoquan Wang

Abstract

Monocular 3D object detection is a low-cost but challenging task, as it requires generating accurate 3D localization solely from a single image input. Recent developed depth-assisted methods show promising results by using explicit depth maps as intermediate features, which are either precomputed by monocular depth estimation networks or jointly evaluated with 3D object detection. However, inevitable errors from estimated depth priors may lead to misaligned semantic information and 3D localization, hence resulting in feature smearing and suboptimal predictions. To mitigate this issue, we propose ADD, an Attention-based Depth knowledge Distillation framework with 3D-aware positional encoding. Unlike previous knowledge distillation frameworks that adopt stereo- or LiDAR-based teachers, we build up our teacher with identical architecture as the student but with extra ground-truth depth as input. Credit to our teacher design, our framework is seamless, domain-gap free, easily implementable, and is compatible with object-wise ground-truth depth. Specifically, we leverage intermediate features and responses for knowledge distillation. Considering long-range 3D dependencies, we propose 3D-aware self-attention and target-aware cross-attention modules for student adaptation. Extensive experiments are performed to verify the effectiveness of our framework on the challenging KITTI 3D object detection benchmark. We implement our framework on three representative monocular detectors, and we achieve state-of-the-art performance with no additional inference computational cost relative to baseline models.

Introduction: The Challenge of Monocular 3D Detection

3D object detection is a foundational task for autonomous driving and robotics. While LiDAR and stereo cameras provide highly accurate 3D bounding boxes, they are expensive and computationally complex. Monocular 3D object detection—using just a single standard camera—is a cost-effective and highly desirable alternative.

The primary challenge lies in the fact that a single 2D image lacks explicit depth information. Existing monocular models attempt to estimate depth using auxiliary networks, but these estimates are inherently flawed. Such depth errors propagate through the network, causing "feature smearing" and poor 3D localization. Prior attempts to mitigate this used Knowledge Distillation (KD), where a powerful "teacher" model (like a LiDAR-based detector) guides a "student" monocular model. However, the fundamental difference between LiDAR point clouds and 2D image pixels creates a massive "domain gap," making it difficult to align features and successfully transfer knowledge.

Methodology: Attention-Based Depth Distillation (ADD)

The authors propose ADD (Attention-based Depth Distillation), a framework designed to be "domain-gap free." Instead of using a different architecture for the teacher, ADD utilizes the exact same architecture for both the teacher and the student. The critical difference is the input: the student receives a standard monocular image, while the teacher receives the image supplemented with ground-truth (GT) depth data.

The ADD framework architecture, highlighting the identical teacher-student structure and the two attention-based distillation modules.

To transfer knowledge effectively, ADD introduces two novel distillation modules:

  1. 3D-Aware Feature Distillation: Operating on intermediate layers, this module uses a self-attention mechanism where the teacher's GT depth is converted into a precise 3D Positional Encoding (PE). This PE guides the student's semantic features, forcing it to learn long-range 3D spatial relationships.
  2. Target-Aware Response Distillation: Operating on the final decoding head, this uses a cross-attention module to align the student's object queries with the teacher's highly accurate, depth-informed queries.

The framework also employs foreground/background balancing masks to ensure the network focuses its learning capacity on actual objects rather than empty space. Crucially, because the attention modules and GT depth processing occur only during training, the final student model maintains zero inference overhead compared to its baseline.

Experimental Evaluation and Results

The framework was trained and evaluated on the KITTI 3D Object Detection Benchmark, categorizing objects into Cars, Pedestrians, and Cyclists. To demonstrate versatility, ADD was implemented on three representative monocular baselines: MonoDETR, CaDDN, and PatchNet.

Performance improvement of three representative monocular detectors when trained with the proposed ADD framework.

Key Findings:

  • Broad Improvements: ADD improved the performance of all three baselines. For instance, on the KITTI validation set, MonoDETR + ADD improved 3D Average Precision ($AP_{3D}$) for the Car category by +1.87% (Easy), +1.33% (Moderate), and +2.04% (Hard).
  • State-of-the-Art Performance: On the official KITTI test set, the ADD framework achieved SOTA results for the Car category, reaching 25.61% (Easy), 16.81% (Moderate), and 13.79% (Hard) $AP_{3D}$. This outperformed previous leading methods like MonoCon by notable margins, particularly on the Easy split (+3.11%).
  • Architectural Symmetry: By keeping architectures identical, the authors bypassed spatial misalignment issues. The student learns exactly what its own features should look like if it possessed perfect depth perception.

Conclusion and Future Work

ADD provides a robust solution for monocular 3D detection by leveraging depth-informed distillation without the typical domain gap issues. While highly effective, the authors noted a limitation regarding data contamination in some baseline depth priors (like DORN), which can mask distillation gains on validation sets. Future work may involve applying this domain-gap free distillation to multi-camera setups or exploring its efficacy in environments with sparse ground-truth depth data.

Summary updated

BibTeX
@inproceedings{wu2023attention,
  author = {Zizhang Wu and Yunzhe Wu and Jian Pu and Xianzhi Li and Xiaoquan Wang},
  title = {{Attention-Based Depth Distillation with 3D-Aware Positional Encoding for Monocular 3D Object Detection}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2023},
  url = {https://openreview.net/forum?id=xwrIYXoR54},
}
Figure