Skip to content
AI360Xpert
Beta

Depth Anything Foundation Depth

Label a few images well, then let a teacher label millions. Depth Anything scales that student-teacher loop into a depth model that works anywhere.

A labeled teacher annotates unlabeled images to train a stronger open-world student
A labeled teacher annotates unlabeled images to train a stronger open-world student

Why Does This Exist?

Labeled depth covers a few rooms and streets; the open world covers everything else. Depth Anything exists to break that ceiling with scale: train a teacher on labeled sets, predict pseudo-depth on tens of millions of unlabeled photos, then train a stronger student on the union with a frozen DINOv2 encoder for semantics. Version 22 adds metric heads for indoor and outdoor ranges.

Teacher basics are MiDaS; the encoder-decoder shape is DPT; the diffusion alternative is Marigold.

Think of It Like This

A tutor grading practice exams

A tutor grades a small set by hand, then photocopies answer keys for a huge practice pile. Students drill the whole pile and beat the tutor, because volume plus strong fundamentals beats a few perfect lessons.

Labeled sets are the hand-graded pile and pseudo-labels are the photocopies. The analogy stops at noise: answer keys are exact while pseudo-depth carries teacher errors that need strong augmentation to survive.

How It Actually Works

Stage one trains the teacher with the MiDaS scale-shift loss on labeled data. Stage two runs the teacher over about 6262 million unlabeled images, keeps confident predictions, and trains the student with heavy color and crop augmentation plus a feature-alignment loss against frozen DINOv2 so semantics persist. Metric version 22 adds separate indoor and outdoor heads after the relative backbone, selected by a scene classifier. Evaluation stays zero-shot: no test scene appears in training.

Worked numbers

Labeled training uses 1.51.5 million frames; unlabeled adds 6262 million, a 4040-fold increase. Indoor zero-shot AbsRel drops from 0.110.11 teacher to 0.070.07 student in the reference split. Pseudo-label filtering keeps the top 7070 percent by edge agreement, discarding 18.618.6 million noisy frames.

Code

def keep_ratio(kept: float, total: float) -> float:    return kept / total  # fraction of pseudo-labels trusted

print(keep_ratio(43.4, 62.0))  # -> 0.7

Watch Out For

Trusting pseudo-labels on mirrors and sky

The teacher errs systematically on glass, mirrors, and open sky, and the student inherits those errors as truth. The symptom is confident wrong depth on windows across many scenes. Filter by multi-crop agreement and keep sky handling explicit instead of distilling blindly.

The Quick Version

  • Depth Anything scales depth with teacher pseudo-labels on unlabeled photos.
  • About 6262 million extra images train the student past the teacher.
  • A frozen DINOv2 encoder preserves open-world semantics.
  • Version 22 adds metric indoor and outdoor heads.
  • Zero-shot indoor AbsRel lands near 0.070.07 after scaling.
  • Pseudo-label filtering decides the final quality more than raw count.