Home/Computer Vision/Depth Estimation
Computer Vision

Depth Estimation

Working out how far away things are from an image — and from a single photo, the absolute scale is mathematically unknowable.

Reading level: Curious
Pick your depth ↓

When not to use it

  • For absolute measurement, from one image. Scale is destroyed by projection. This isn't fixable.
  • For robot navigation or obstacle avoidance, alone. A dollhouse and a room are pixel-identical.
  • On reflective or transparent surfaces. The model predicts the reflection's depth, confidently.
  • Expecting stereo accuracy at distance. It degrades with distance squared.

Reach for something else instead

  • Stereo — a known baseline is an external ruler. Real metres, good to a few of them.
  • LiDAR / time-of-flight — measure it. Expensive and correct.
  • Structure from motion — many views, and you get scale if you know the camera's movement.
  • A known reference object — if there's an A4 sheet in frame, you have scale.

Sources & further reading

  • Ranftl et al. (2022), Towards Robust Monocular Depth Estimation: Mixing Datasets for Zero-shot Cross-dataset Transfer — MiDaS; the scale-invariant loss that encodes the impossibility.
  • Godard et al. (2019), Digging Into Self-Supervised Monocular Depth Estimation — monodepth2; supervision from geometry, no labels.
  • Eigen, Puhrsch & Fergus (2014), Depth Map Prediction from a Single Image using a Multi-Scale Deep Network — the paper that started it.

Primary sources, listed so you can check the claims on this page rather than take them on trust.

Where people go wrong

  • Reading monocular depth as metres. It's relative, and the absolute is unknowable from one image.
  • Building navigation on it. That's the case where the ambiguity has consequences.
  • Thinking a bigger model fixes scale. Projection destroyed the information; there's nothing to recover.
  • Treating the output as a measurement. It's a prior about what scenes usually look like.

At a glance

FieldComputer Vision
What it givesrelative depth; ordering, not metres
Why absolute is impossibleprojection destroys scale; a room and a dollhouse are pixel-identical
The elegant bitMiDaS's scale-invariant loss encodes the impossibility and unlocks the data
Neverbuild a robot on it alone
DifficultyIntermediate
Flashcards for this concept
Question
Answer
1 / 4

Often compared with

Monocular vs. stereo depth — one is a very good prior about what scenes usually look like; the other is a measurement with a ruler. Only one is safe to drive into a wall with.