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

Depth Anything: Unleashing the Power of Large-Scale Unlabeled Data

Lihe Yang, Bingyi Kang, Zilong Huang, Xiaogang Xu, Jiashi Feng, Hengshuang Zhao

Abstract

Monocular Depth Estimation (MDE) is a fundamental task in computer vision, essential for robotics, autonomous driving, and augmented reality. Despite its importance, the field has struggled to produce a truly universal foundation model due to the high cost and scarcity of diverse, high-quality depth labels. In this work, we present "Depth Anything," a highly robust MDE foundation model that scales training to 62 million unlabeled images. By employing a teacher-student self-training pipeline with aggressive perturbations and semantic-assisted perception via DINOv2, Depth Anything achieves unprecedented zero-shot generalization. Our model significantly outperforms existing state-of-the-art methods like MiDaS v3.1 and sets new benchmarks for both relative and metric depth estimation.

Introduction

Predicting the 3D structure of a scene from a single 2D image is a core challenge in spatial AI. While previous efforts have attempted to build foundation models by aggregating multiple labeled datasets, these models often fail to generalize to the "open world" due to the limited diversity of environments captured by specialized hardware like LiDAR or Structure-from-Motion (SfM).

The primary bottleneck in MDE is data. High-quality labels are expensive and time-consuming to acquire. Depth Anything addresses this by leveraging massive, diverse, and cheap unlabeled data. By scaling the training set to include over 60 million unlabeled images, we bridge the generalization gap and create a model capable of handling any scene, from indoor rooms to hazy cityscapes.

Methodology: Scaling with Unlabeled Data

The core of Depth Anything is a three-stage pipeline designed to effectively utilize unlabeled data while maintaining high precision.

The Depth Anything training pipeline, utilizing both labeled data and a massive pool of unlabeled images through a teacher-student framework with semantic preservation.

1. The Teacher-Student Framework

We first train a teacher model on approximately 1.5 million high-quality labeled images from six public datasets (e.g., MegaDepth, TartanAir). This teacher is then used to generate "pseudo-depth" labels for 62 million unlabeled images sourced from diverse datasets like ImageNet-21K and SA-1B.

To prevent the student model from merely replicating the teacher's errors, we introduce challenging self-training. During training, the student receives inputs subjected to aggressive perturbations—including CutMix, color jittering, and Gaussian blur—while the teacher processes clean images. This forces the student to learn more robust, invariant spatial representations.

2. Semantic-Assisted Perception

Depth estimation requires an understanding of scene semantics to resolve geometric ambiguities. We enforce a feature alignment loss between our depth model and a frozen DINOv2 encoder. This ensures the model inherits rich semantic priors, helping it distinguish between complex visual features like shadows versus physical holes.

Experimental Results

Depth Anything demonstrates remarkable versatility across a wide range of benchmarks and real-world scenarios.

Qualitative results of Depth Anything across diverse indoor and outdoor scenes, demonstrating robust zero-shot generalization.

Zero-Shot Generalization

In zero-shot evaluations, Depth Anything significantly outperforms MiDaS v3.1. For instance, on the DDAD dataset, it improved the Absolute Relative Error (AbsRel) from 0.251 to 0.230. The model's robustness is particularly evident in challenging conditions such as low-light environments and foggy weather, where traditional models often struggle.

Metric Depth and Downstream Tasks

When fine-tuned for metric depth on NYUv2, the model achieved a $\delta_1$ accuracy of 0.984, surpassing the previous state-of-the-art of 0.964. Furthermore, the pre-trained depth encoder proved to be an exceptional backbone for semantic segmentation, achieving 86.2 mIoU on Cityscapes and 59.4 mIoU on ADE20K, outperforming specialized models like Swin-L.

Conclusion and Future Work

Depth Anything demonstrates that scaling the quantity and diversity of data via unlabeled sources is more effective for building foundation models than relying solely on niche labeled sets. The combination of a massive data engine and semantic priors allows for a model that is both robust and precise.

Future research will focus on scaling the architecture to larger scales and increasing the training resolution to further enhance detail. While the current perturbation strategy is effective, reducing the noise in initial pseudo-labels remains a key area for improvement.

Summary updated

BibTeX
@inproceedings{yang2024depth,
  author = {Lihe Yang and Bingyi Kang and Zilong Huang and Xiaogang Xu and Jiashi Feng and Hengshuang Zhao},
  title = {{Depth Anything: Unleashing the Power of Large-Scale Unlabeled Data}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2024},
}
Figure