Course contentsShow
← Machine Learning and Deep Learning
Lesson 997 of 3,53822. Computer Vision TasksFree lesson

Depth Estimation from Single Images

Predicting depth maps from monocular images: supervised and self-supervised approaches to estimate scene geometry.

Depth Estimation from Single Images

What you'll learn: How neural networks can predict how far away objects are in a scene using just a single photograph, mimicking human depth perception.

The Core Problem

Humans have two eyes that give us stereoscopic vision, but we can still estimate depth from a single photograph using visual cues like object size, occlusion (what blocks what), texture gradients, and perspective. Depth estimation trains neural networks to do the same—predict a depth map where each pixel's value represents its distance from the camera.

Why It Matters

Unlike optical flow (which tracks motion between frames), depth estimation works on static images. This is crucial for applications like autonomous driving, AR/VR, 3D reconstruction, and robotics where you need to understand scene geometry instantly.

Two Main Approaches

Supervised Learning

Train CNNs (often U-Net-like architectures with encoder-decoder structure) on pairs of RGB images and ground-truth depth maps. The network learns to predict depth values directly. Challenge: acquiring accurate depth ground truth is expensive (requires LiDAR or structured light sensors).

Self-Supervised Learning

The breakthrough approach: train without depth labels by using stereo image pairs or video sequences. The network predicts depth, which is used to synthesize one view from another. If the synthesis matches reality, the depth must be correct. This clever trick turns depth estimation into an image reconstruction problem.

The Architecture Pattern

Most modern depth estimators use encoder-decoder networks (similar to segmentation architectures like U-Net) that downsample to capture semantic understanding, then upsample to produce a dense depth map matching the input resolution.

Key Takeaway: Depth estimation transforms a single 2D image into a 3D understanding of the scene using CNNs, either through supervised learning with ground-truth depth or self-supervised approaches that learn from geometric consistency across multiple views.