NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

RoSAMDepth: Robust Self-supervised Depth Estimation Leveraging Segment Anything Model

Xuanang Gao, Zhiwei Ning, Gengming Zhang, Jiaxi Cao, Runze Yang, Zhonglong Zheng, Jie Yang, Rong Xiao, Wei Liu

TL;DR

RoSAMDepth improves self-supervised monocular depth estimation in adverse conditions (like rain and night) by incorporating object-level priors from the Segment Anything Model (SAM). By introducing object-aware feature contrastive learning, adaptive regional smoothness, and object-level reliability filtering during training, it achieves sharper boundaries and state-of-the-art accuracy without adding any inference-time computational overhead.

What Problem Does This Paper Address?

Monocular depth estimation—predicting 3D depth from a single 2D image—is a cornerstone of autonomous driving, robotics, and AR/VR. Self-supervised methods are highly attractive because they learn depth purely from raw video sequences using geometric and photometric consistency constraints, bypassing the need for expensive LiDAR or human annotations.

However, these methods suffer from a major flaw: they assume that a point's appearance remains constant across video frames (photometric consistency). In adverse conditions like nighttime, heavy rain, or glare, this assumption completely breaks down. Furthermore, standard self-supervised frameworks treat images as uniform grids of pixels, ignoring semantic or object-level boundaries. This causes depth predictions to "bleed" across object edges, resulting in blurred boundaries and unstable depth maps in complex environments.

Visual comparison of depth maps under diverse conditions

Methods

To inject structural and object-level awareness into depth estimation, the authors introduce RoSAMDepth. Crucially, the Segment Anything Model (SAM) is used entirely offline to pre-generate non-overlapping object masks before training begins, meaning the final model remains lightweight and fast during deployment.

The framework builds upon a teacher-student distillation paradigm and introduces three novel components:

  1. Segment-Guided Representation Contrasting (SRC): Instead of forcing depth outputs to rigidly match SAM boundaries (which fails when SAM over-segments an object), SRC operates in the latent feature space. It uses a contrastive loss function to pull pixel features belonging to the same object closer together while pushing features from different objects apart.
  2. Adaptive Regional Outlier Masking (AROM) & Regional Gaussian Likelihood Loss: Traditional smoothness losses fail when depth is smoothly but incorrectly estimated across an object boundary. AROM dynamically computes an outlier mask based on the depth variance within each SAM segment. This mask guides a regional Gaussian likelihood loss to enforce smoothness strictly within continuous object regions while preserving sharp edges.
  3. Object-Level Reliability Estimation (ORE): Standard pixel-level error metrics can be easily fooled by uniform textures (e.g., a misscaled car can still yield low pixel-level error). ORE aggregates photometric errors across entire SAM segments to evaluate depth reliability at the object level, down-weighting untrustworthy regions during knowledge distillation.
Figure 2. Illustration of the proposed method. Given the SAM masks, we leverage object-level priors to improve depth estimation Ds in two complementary ways: 1) Object-aware representation learning: SRC injects segment priors into multi-scale features. 2) Depth learning with object-level priors, AROM generates an outlier-suppressed mask Mout, which is paired with Lrgl to enforce consistent depth within each region. Concurrently, ORE estimates object-level reliability to form a reliability-weighted map Wrel, combined with Mout to modulate the distillation loss Ld.

Datasets

The authors evaluated RoSAMDepth on two challenging real-world driving benchmarks:

  • nuScenes: A massive dataset containing diverse environmental conditions. The training split included 15,129 daytime, 3,796 rainy, and 2,551 nighttime frames.
  • Oxford RobotCar: Used specifically to benchmark daytime vs. nighttime performance, utilizing 17,790 daytime and 19,162 nighttime images for training.

Key Insights and Ideas

  • Latent Space vs. Output Space Constraints: Forcing depth maps to strictly align with segmentation masks introduces noise due to mask fragmentation. Constraining the feature representations instead allows the network to implicitly learn object geometry without suffering from over-segmentation artifacts.
  • The Illusion of Pixel-Level Accuracy: Pixels within the same object share similar appearances, which can lead to accidental alignments and low photometric errors even if the object's scale is completely wrong. Evaluating reliability at the object level provides a much truer supervision signal.
Figure 4. Pixel-level photometric error is insufficient for evaluat- ing the object-level depth reliability. (a) Image patch. (b) Depth predictions from Φt, with the car’s depth scaled from 0.25 to 4.0. (c) The corresponding photometric error map, where brighter in- tensity denotes larger error, fails to capture the object-level depth reliability. (d) Depth map obtained by selecting, for each pixel, the scaled depth that minimizes the pixel-level photometric error. (e) Our object-level reliability correctly identifies the entire mis- predicted car as an unreliable region.

Key Results

RoSAMDepth consistently outperformed state-of-the-art unsupervised and real-data-trained methods across both datasets:

  • nuScenes Benchmark: Compared to the real-data baseline (Syn2Real-Depth), RoSAMDepth achieved average relative gains of 2.8% on Absolute Relative Error (AbsRel) and 2.7% on Squared Relative Error (SqRel) across all weather conditions and frame settings.
  • Oxford RobotCar Benchmark: Under single-frame evaluation, the model demonstrated substantial improvements, reducing AbsRel by 4.4% and SqRel by 7.6%.
  • Qualitative Improvements: Visually, the model excels at preserving the fine structures of poles, street signs, and distant vehicles, while successfully suppressing reflection-induced artifacts on rainy roads and night glare.

Limitations and Future Work

While RoSAMDepth successfully avoids inference-time overhead by using SAM offline, its training performance is inherently bounded by the quality of the pre-generated SAM masks. In cases of extreme degradation where even SAM fails to segment key objects, the object-level priors could introduce noise.

The authors suggest that future work could explore integrating online, lightweight segmentation models or jointly optimizing depth and segmentation tasks under adverse conditions.

Summary updated

BibTeX
@inproceedings{gao2026rosamdepth,
  author = {Xuanang Gao and Zhiwei Ning and Gengming Zhang and Jiaxi Cao and Runze Yang and Zhonglong Zheng and Jie Yang and Rong Xiao and Wei Liu},
  title = {{RoSAMDepth: Robust Self-supervised Depth Estimation Leveraging Segment Anything Model}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=xmyrY6HdQr},
}
Figure