MonoDepth

Godard 2016 · Paper

One-line summary — Self-supervised monocular depth estimation trained on stereo pairs via left-right photometric consistency: stereo images supervise training, but a single image suffices at test time.

Problem

Supervised monocular depth estimation treats depth as a regression problem and therefore requires vast quantities of ground-truth depth, which even expensive laser scanners deliver imprecisely in natural scenes with movement and reflections. Stereo rigs, by contrast, are cheap and ubiquitous. MonoDepth’s insight is to pose depth estimation as an image reconstruction problem during training: predicting the disparity field dd that warps one rectified view into the other is equivalent to predicting depth via d^=bf/d\hat{d}=bf/d (baseline bb, focal length ff), so image reconstruction error becomes the training signal and no depth labels are ever needed.

Method & architecture

Network. A fully convolutional encoder-decoder inspired by DispNet (31M parameters; a ResNet50-encoder variant has 48M), with skip connections and disparity outputs at four scales. Crucially, from the left image alone it predicts both disparity maps dld^l and drd^r; the right image is used only in the loss. Backward warping uses the fully differentiable bilinear sampler from spatial transformer networks: I~l=Ir(dl)\tilde{I}^l = I^r(d^l). Disparities are constrained to [0,0.3×width][0, 0.3\times\text{width}] by a scaled sigmoid; ELUs replace ReLUs (which prematurely froze intermediate-scale disparities), and deconvolutions are replaced by nearest-neighbor upsample + conv.

Loss. Total loss C=s=14CsC=\sum_{s=1}^4 C_s, with each scale combining three mirrored (left/right) terms:

Cs=αap(Capl+Capr)+αds(Cdsl+Cdsr)+αlr(Clrl+Clrr)C_s=\alpha_{ap}(C_{ap}^{l}+C_{ap}^{r})+\alpha_{ds}(C_{ds}^{l}+C_{ds}^{r})+\alpha_{lr}(C_{lr}^{l}+C_{lr}^{r})

Naïve single-direction sampling produces disparities aligned with the wrong image or “texture-copy” artifacts and errors at depth discontinuities; enforcing mutual consistency between dld^l and drd^r fixes both. Weights: αap=αlr=1\alpha_{ap}=\alpha_{lr}=1, αds=0.1/r\alpha_{ds}=0.1/r per scale. Trained 50 epochs with Adam (lr 10410^{-4}, batch 8) in ~25 h on a Titan X; flips/color jitter augmentation. A test-time post-processing step (pp) averages disparities of the image and its mirror to suppress stereo disocclusion ramps. At test time only dld^l at the finest scale is used; inference runs under 35 ms (28+ FPS) for a 512×256 image.

Results

Why it matters for SLAM

MonoDepth pioneered self-supervised depth estimation and spawned a massive research direction (Monodepth2, PackNet, and dozens more); its left-right consistency and SSIM + L1 photometric-loss machinery became standard tools. For SLAM, it opened the path to depth priors that can be trained from the same kind of raw driving/robot footage a SLAM system already collects — no depth sensor required — which is the foundation of the self-supervised depth line used in D3VO, MonoRec, and modern monocular dense mapping.