Abstract
We propose MaskingDepth, a novel semi-supervised learning framework for monocular depth estimation to mitigate the reliance on large ground-truth depth quantities. MaskingDepth is designed to enforce consistency between the strongly-augmented unlabeled data and the pseudo-labels derived from weakly-augmented unlabeled data, which enables learning depth without supervision. In this framework, a novel data augmentation is proposed to take the advantage of a naive masking strategy as an augmentation, while avoiding its scale ambiguity problem between depths from weakly- and strongly-augmented branches and risk of missing small-scale instances. To only retain high-confident depth predictions from the weakly-augmented branch as pseudo-labels, we also present an uncertainty estimation technique, which is used to define robust consistency regularization. Experiments on KITTI and NYU-Depth-v2 datasets demonstrate the effectiveness of each component, its robustness to the use of fewer depth-annotated images, and superior performance compared to other state-of-the-art semi-supervised methods for monocular depth estimation. Furthermore, we show our method can be easily extended to domain adaptation task. Our code is available at https://github.com/KU-CVLAB/MaskingDepth.
Introduction
Monocular depth estimation—predicting 3D distance from a single 2D image—is a cornerstone of autonomous driving and AR/VR. However, training these models typically requires massive amounts of ground-truth depth data, which is difficult and expensive to collect, requiring specialized hardware like LiDAR or structured light sensors.
While self-supervised methods (using stereo pairs or video sequences) have emerged, they often produce blurry object boundaries. Semi-supervised learning, which uses a small set of labeled data to guide learning on a larger unlabeled set, is a promising middle ground. The core challenge is consistency regularization: how to perturb an image (strong augmentation) such that the model learns robust features without losing the delicate scale and context information required to judge depth.
Methodology
The MaskingDepth framework utilizes a teacher-student architecture. An input image is processed through two branches:
- The Weak Branch (Teacher): Receives a "weakly augmented" image (standard flips/color jitter) and generates a pseudo-depth label and an uncertainty map.
- The Strong Branch (Student): Receives a "strongly augmented" version of the same image and attempts to match the teacher's prediction.
K-way Disjoint Masking
The primary innovation is K-way Disjoint Masking. In standard masked modeling, hiding parts of the image causes the model to lose the global context needed to determine scale (e.g., if the ground is masked, the model cannot determine camera height).
In this approach, the image is split into $K$ disjoint subsets of tokens. Each subset is encoded independently by a Transformer encoder. These encoded features are then reassembled before being passed to a CNN decoder. This forces the encoder to work with partial, corrupted information while ensuring the decoder still sees the entire scene layout, preserving global context and scale.
Uncertainty Estimation
To handle noise in pseudo-labels, the consistency loss between the teacher and student is weighted by the teacher's confidence. The student essentially ignores pixels where the teacher is unsure, preventing the propagation of errors during training.
Key Results
The researchers evaluated MaskingDepth on industry-standard benchmarks including KITTI (outdoor) and NYU-Depth-v2 (indoor).
- Sparse Label Efficiency: On KITTI, using only 100 labeled frames, MaskingDepth achieved an AbsRel of 0.124, significantly outperforming the baseline (0.136).
- State-of-the-Art Performance: The model outperformed existing semi-supervised methods like SemiDepth and even some self-supervised methods that utilize extra stereo data.
- Visual Quality: Qualitatively, the method produces much sharper object boundaries and better handles small-scale objects compared to reconstruction-based models.
Discussion and Limitations
The authors identify that "naive" masking is the "Achilles' heel" of depth estimation due to scale ambiguity. K-way masking provides the benefits of masking (forcing robust feature learning) without the loss of global geometry.
However, the model can still struggle in regions that are rarely annotated, such as sky regions or highly reflective surfaces. Future work may involve extending this K-way masking strategy to other dense prediction tasks like semantic segmentation or optical flow.
Summary updated