TL;DR
This paper introduces MT-SfMLearner, a novel approach that adapts Vision Transformers for self-supervised monocular depth estimation, even when camera intrinsics are unknown. The study demonstrates that transformers offer comparable performance to CNNs while exhibiting superior robustness to natural corruptions and adversarial attacks, making them a promising alternative for autonomous driving applications.
What Problem Does This Paper Address?
Autonomous driving and advanced driver-assistance systems (ADAS) heavily rely on accurate 3D scene understanding. A crucial component of this is monocular depth estimation – predicting the distance of objects from a single camera image without ground truth depth labels. While Convolutional Neural Networks (CNNs) have been the dominant architecture for this task, they have limitations. CNNs process information locally and lose spatial resolution through downsampling, potentially hindering their ability to capture global scene context. Vision Transformers (ViTs), on the other hand, process information at a constant resolution with a global receptive field, offering a different inductive bias. However, their application to self-supervised monocular depth estimation, especially when camera intrinsics (like focal length and principal point) are unknown or vary, has not been thoroughly investigated. This paper aims to bridge this gap by comparing transformer-based and CNN-based architectures for this task, evaluating their performance, robustness, and efficiency.
Methods
The core of this work is the Monocular Transformer Structure from Motion Learner (MT-SfMLearner). This method adapts existing Vision Transformer architectures, specifically the Dense Prediction Transformer (DPT) and DeiT-Base, for self-supervised monocular depth estimation.
Key methodological contributions include:
- Transformer Adaptation for Depth Estimation: The authors re-purpose modules from DPT and Monodepth2 to create a transformer-based encoder-decoder architecture. This involves an "Embed" module to convert image patches into tokens, a "Transformer block" with multi-head self-attention for global context, and "Reassemble" and "Fusion" modules in the decoder to reconstruct depth maps.
- Learned Camera Intrinsics: To address the challenge of unknown or varying camera intrinsics, the authors introduce a modular intrinsics estimation module. This module is integrated into the ego-motion network and learns to predict focal lengths and principal points directly from the input images. This allows the entire system to be trained end-to-end without requiring pre-defined intrinsic parameters.
- Self-Supervised Training: The system is trained using appearance-based photometric losses, similar to Monodepth2. This involves synthesizing target images from source images using predicted depth and ego-motion, and minimizing the difference between the synthesized and real target images. A smoothness loss on the depth predictions is also employed.
Datasets
The primary dataset used for training and evaluation is the KITTI Eigen Split (Eigen et al., 2014). This dataset is widely used for monocular depth estimation benchmarks. The authors also report results on the KITTI Online Benchmark for depth prediction.
Key Insights and Ideas
- Transformers Offer Global Context: The global receptive field of transformers allows them to capture more globally coherent depth predictions, especially for larger objects and in scenarios with reflections. This contrasts with CNNs, which excel at local details and sharp boundaries due to their inherent spatial inductive bias.
- Robustness Advantage: Transformers demonstrate a significant improvement in robustness against natural corruptions (noise, blur, weather effects) and adversarial attacks (PGD, flipped examples). This suggests that their global processing mechanism makes them less susceptible to localized perturbations.
- Learned Intrinsics are Viable: The proposed method for learning camera intrinsics simultaneously with depth and ego-motion is effective. It maintains comparable depth estimation performance and robustness, even when compared to using known ground-truth intrinsics. This is crucial for real-world applications where intrinsics might be unknown or change.
- Trade-offs Exist: While transformers offer superior robustness and comparable performance, they are computationally more demanding and consume more energy than their CNN counterparts, impacting real-time application feasibility.
Key Results
- Performance: MT-SfMLearner achieves comparable performance to state-of-the-art CNN-based methods on the KITTI Eigen split across various resolutions, according to metrics like Abs Rel, Sq Rel, RMSE, and RMSE log.
- Robustness:
- Against natural corruptions, transformer-based architectures (especially T,T - transformer depth and ego-motion) show significantly lower RMSE compared to CNN-based ones.
- Against PGD adversarial attacks, transformers also exhibit improved robustness, with the T,T combination performing best.
- Against symmetrically flipped adversarial examples, transformer-based depth estimation also leads to more robust predictions.
- Learned Intrinsics Impact: When intrinsics are learned, the performance and robustness of both CNN and transformer models are largely maintained, with minimal degradation compared to using ground-truth intrinsics.
- Efficiency: While transformers achieve comparable performance, they are computationally more demanding and consume more energy. For example, at 640x192 resolution, a CNN-based architecture achieves ~84 fps for depth estimation with ~3.2 J/frame, while a transformer-based architecture achieves ~40 fps with ~6.0 J/frame.
Limitations and Future Work
- Computational Cost: The primary limitation highlighted is the higher computational cost and energy consumption of transformer-based architectures compared to CNNs, which could impact real-time deployment.
- Future Work: The authors suggest that this work provides a foundation for evaluating the trade-offs between performance, robustness, and efficiency for selecting suitable architectures. Further research could explore methods to improve the efficiency of transformers for real-time applications or investigate hybrid architectures that leverage the strengths of both CNNs and transformers. The modular nature of the learned intrinsics module also opens avenues for its integration into other self-supervised depth estimation frameworks.
Summary updated