arXiv:2610.38587cs.CVOct 2026

Manuscript Offprint

arXiv:2610.38587

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

Abstract

Robust depth estimation aims to maintain high-quality depths across diverse conditions. However, most existing methods estimate depth without taking into account the object-level information. As a result, the predicted depth may easily deviate within objects and become blurred under adverse conditions. To overcome this weakness, we propose RoSAMDepth, a novel framework that can assist robust self-supervised depth estimation in leveraging rich and diverse object-level priors from the Segment Anything Model (SAM). We focus on incorporating object-level information across three key aspects: a segment-guided representation contrasting method that injects object-level awareness into the feature representation space; an adaptive regional outlier masking strategy combined with a regional Gaussian likelihood loss that enforces regional depth smoothness; and an object-level reliability estimation strategy that mitigates the influence of unreliable supervision. Extensive experiments across multiple datasets and diverse weather conditions demonstrate that our method produces sharper, more accurate depth predictions, consistently outperforming state-of-the-art methods. Our code is available at https://github.com/xagao/RoSAMDepth.

1. Introduction

Monocular depth estimation is a fundamental task in computer vision, crucial for downstream applications, such as autonomous driving, robotics, and AR/VR. Supervised methods [1, 5, 15, 17, 26] achieve high accuracy but rely on expensive ground-truth (GT) depths for training. To alleviate this dependency, self-supervised methods leverage geometrical constraints from stereo pairs or monocular videos to learn depth estimation without explicit annotations [2, 7, 8, 11, 22, 36, 40, 43].

∗^{*}Corresponding Author: Wei Liu

Figure

Figure 1. Our RoSAMDepth utilizes object-level information from SAM [14] to generate sharp and accurate depths across diverse conditions.

Despite their success under standard daytime conditions, self-supervised methods often degrade in challenging conditions such as nighttime or adverse weather [7, 21, 28, 37], where the photometric consistency breaks. Early works address a specific condition (e.g., nighttime), using adversarial learning or feature disentanglement for domain representations [18, 30, 32]. Recent methods [7, 21, 28, 37] focus on unified robustness across diverse degradations by synthesizing paired data with teacher-student learning or further adapting synthetic-trained teachers to real degraded data.

However, existing methods typically treat degraded regions uniformly, without considering the semantic or object-level differences that significantly influence visual perception and depth estimation. As shown in Fig. 1, ignoring object-level priors can lead to blurred depth boundaries and unstable predictions under complex environments or diverse conditions. To better estimate depth across diverse real data, it is important to understand the object spatial relationships and assess the reliability of depth cues. Meanwhile, the predicted depth should also be smooth only within the same continuous object region, while allowing sharp depth boundaries near object edges. Thus, incorpo-rating object-level information is key to refining robust self-supervised depth estimation under adverse conditions.

Indeed, prior methods exploit semantic segmentation to incorporate object information for depth estimation under standard conditions [12, 19]. However, semantic segmentation is inherently limited, as it cannot distinguish instances within the same class, which may have drastically different depths. It is also constrained by a limited set of predefined classes, often failing to recognize novel objects in the open world. Moreover, segmentation models trained on specific domains or weather conditions generalize poorly across diverse scenarios. In comparison, the Segment Anything Model (SAM) [14] offers a better option. SAM is a general-purpose image segmentation model pre-trained on massive and diverse datasets. It separates individual instances and demonstrates strong zero-shot robustness to unseen objects and various weather conditions [14, 25, 29].

Building upon these advantages, we propose to integrate SAM for additional object-level information to enhance robust self-supervised depth estimation. Our framework jointly improves feature representation and depth learning. Specifically, for representation learning, we propose segment-guided representation contrasting (SRC) that exploits SAM masks for implicitly embedding object-level structural awareness into the feature space. Furthermore, to improve supervision for depth learning, we identify key limitations in the conventional smoothness loss and the pixel-level pseudo-label quality indicator. In response, we introduce two strategies: an adaptive regional outlier masking (AROM) strategy paired with a regional Gaussian likelihood loss to rectify inconsistent depth outliers; and an object-level reliability estimation (ORE) strategy that mitigates the influence of unreliable supervision signals. Our method significantly outperforms previous methods in diverse conditions through different real-world datasets [3, 20]. In summary, our contributions are as follows:

• To the best of our knowledge, we are the first to effectively integrate SAM into robust self-supervised depth estimations, using only pre-generated SAM masks during the training as object-level priors.

• We propose three novel designs to take full advantage of SAM's object-level priors: segment-guided representation contrasting (SRC), adaptive regional outlier masking (AROM) strategy combined with a regional Gaussian constraint, and object-level reliability estimation (ORE) strategy. These components provide efficient guidance to train the model and lead to improved depth.

• Extensive experiments on the nuScenes [3] and Oxford Robotcar [20] benchmarks demonstrate that our method consistently outperforms state-of-the-art approaches, delivering sharper and more accurate depth under diverse real-world conditions.

References (42)