Introduction
Monocular depth estimation—the task of predicting a 3D depth map from a single 2D RGB image—is a fundamental yet ill-posed problem in computer vision. Traditional approaches often rely on Convolutional Neural Networks (CNNs) to regress depth values pixel-by-pixel. However, these methods frequently struggle with two key issues: a lack of global context at high resolutions and the use of fixed depth ranges that do not adapt to the specific content of an image. AdaBins addresses these limitations by introducing a Transformer-based module that adaptively divides the depth range into image-specific bins, combining the advantages of classification and regression.
The AdaBins Architecture
The proposed architecture integrates a novel building block, the AdaBins module, into a standard encoder-decoder framework. The system typically uses an EfficientNet B5 backbone as the encoder to extract features from the input image.
The core of the innovation lies in the mini-ViT (Vision Transformer) block. Unlike standard CNNs that process global information only at low-resolution bottlenecks, the mini-ViT performs global statistical analysis on high-resolution features. This allows the model to perform "Hybrid Regression" through two main steps:
- Adaptive Binning: The module analyzes the image to predict a set of bin widths ($b$), creating a custom "depth ruler" tailored to the scene. For instance, in a close-up indoor shot, bins are concentrated at shorter distances, whereas for outdoor landscapes, they are distributed more broadly.
- Range-Attention Maps: Simultaneously, the model generates attention maps that estimate the probability of each pixel belonging to a specific bin.
The final depth value is calculated as a weighted average (linear combination) of the bin centers. This prevents the "staircase" artifacts common in purely classification-based depth models, achieving the stability of classification with the smooth gradients of regression.
Experimental Setup and Results
The performance of AdaBins was evaluated on three major industry-standard benchmarks:
- NYU Depth v2: A large-scale dataset of indoor scenes.
- KITTI: The gold standard for outdoor driving scenes using LiDAR-based ground truth.
- SUN RGB-D: Used for cross-dataset generalization tests to evaluate how well the model adapts to unseen environments.
AdaBins achieved a "decisive improvement" over previous state-of-the-art (SOTA) models like BTS and DAV. On the KITTI dataset, the model improved the Root Mean Squared Error (RMSE) by 13.5% and reduced the Squared Relative Difference by 22.4%. Similar record-breaking performance was observed on NYU Depth v2 across all metrics.
Beyond quantitative metrics, the qualitative improvements are substantial. As shown in the comparison above, AdaBins produces significantly sharper object boundaries and more realistic, smooth surfaces. The adaptive binning strategy allows the network to "focus" its numerical precision on the most relevant depth ranges for a given scene, leading to better detail preservation. Furthermore, the model showed superior generalization capabilities when tested on the SUN RGB-D dataset after being trained on NYU, indicating that the adaptive approach is more robust to domain shifts.
Conclusion and Future Work
By rethinking depth estimation as a hybrid task guided by global context, AdaBins sets a new standard for monocular depth prediction. The "focus" effect created by adaptive bins allows the network to effectively concentrate its resolution where it matters most. While the use of Transformers introduces some computational overhead, the gains in accuracy and visual quality are significant. Future work may focus on optimizing inference speeds for real-time mobile applications and extending the adaptive binning concept to other high-resolution tasks like semantic segmentation or 3D reconstruction.
Summary updated