Abstract
Self-supervised monocular depth estimation often struggles with inaccuracies at object boundaries and moving objects. This paper introduces ROIFormer, which uses semantic segmentation cues to guide a localized, deformable Transformer attention mechanism. By restricting attention to semantically relevant Regions of Interest (ROIs), it achieves state-of-the-art depth estimation accuracy on the KITTI dataset with significantly lower computational overhead than global Transformer methods.
Introduction
Self-supervised monocular depth estimation attempts to learn 3D depth from 2D video sequences without relying on expensive LiDAR ground truth. It typically does this by enforcing photometric consistency—matching pixels between consecutive frames based on camera motion. However, this approach breaks down at object boundaries, on moving objects, and in low-texture or reflective areas.
To fix this, recent methods incorporate semantic segmentation to provide geometric guidance. While Transformer-based attention mechanisms are great at fusing these semantic and depth features, they have major drawbacks: standard global attention is computationally expensive, and unconstrained "deformable" attention tends to diverge or collapse when applied to high-resolution images because the search space is simply too large. ROIFormer addresses these challenges by efficiently fusing semantic and depth information without overwhelming the compute budget.
Methods
The proposed joint multi-task network shares a U-Net encoder for both depth estimation and semantic segmentation, introducing several key novelties:
ROIFormer Module
Instead of allowing the attention mechanism to search the entire image or wander aimlessly, ROIFormer uses semantic cues to predict a local bounding box—a Region of Interest (ROI)—for each query point. Deformable attention is then strictly bounded within this ROI. This filters out irrelevant background noise and forces the network to aggregate features from the specific object or semantic region.
Multi-Head ROI Proposals
The module uses a multi-head structure to generate multiple ROI proposals per point, allowing the network to capture and distill information from different semantic levels simultaneously. This constrained search space prevents the convergence issues typically seen in high-resolution deformable attention.
Semantic Guided Re-projection Mask
Because depth estimation is highly uncertain at instance boundaries, standard photometric loss calculations can become contaminated. The authors introduce a custom mask that applies a penalty coefficient based on the distance from a point to an instance boundary, effectively ignoring unreliable boundary pixels during training.
Results and Discussion
The model was evaluated on the KITTI dataset, the standard benchmark for autonomous driving depth estimation, using the Eigen and Fergus split.
State-of-the-Art Accuracy
ROIFormer establishes a new state-of-the-art (SOTA) on the KITTI Eigen test set. Using a ResNet-50 backbone on High-Resolution (HR) images, it achieved an Absolute Relative (AbsRel) error of 0.096 and an RMSE of 4.148. Qualitatively, the method produces sharper boundaries and more accurate depth maps compared to previous methods.
Efficiency and Real-Time Performance
A key advantage of ROIFormer is its efficiency. It achieves SOTA performance using only ~30% of the MACs compared to recent Transformer-based methods like MonoViT. On a single NVIDIA Tesla V100 GPU, the ResNet-18 variant runs at 51 FPS on medium resolution, while the heavier ResNet-50 variant achieves 45 FPS.
Conclusion
ROIFormer demonstrates that constraining the search space of deformable attention using semantic ROIs prevents convergence issues and leads to sharper depth boundaries. While the method currently relies on pre-computed segmentation maps for training, it significantly advances the efficiency and accuracy of self-supervised depth estimation. Future work will focus on handling extreme uncertainties such as highly reflective surfaces and massive occlusions.
Summary updated