Paper commentary
Digging Into Self-Supervised Monocular Depth Estimation
Monodepth2 uses minimum reprojection loss to train depth from video
- Problem Averaging photometric error over views penalizes occluded pixels with correct depth.
- Method Monodepth2 takes the per-pixel minimum error over source views instead of the average. It also masks out stationary pixels automatically, computed on the forward pass, and computes the loss at full input resolution.
- Results Monodepth2 scores 0.115 Abs Rel on the monocular Eigen split, compared with 0.183 for Zhou et al.
Why averaging across views stalls video training
Self-supervised depth training avoids per-pixel ground truth, and monocular video is the harder of its two main forms. Video training must also learn a pose network alongside the depth network, whereas stereo turns camera pose into a one-time offline calibration. The photometric loss is where the trouble starts, because it averages the reprojection error over all source views.
A pixel visible in the target but hidden in one source view then gets a high penalty, even when its predicted depth is correct.
Averaging also blurs depth edges at disocclusions, and masking out-of-view pixels doesn't address that case. A second failure comes from the static-scene assumption, which breaks when the camera stops or an object moves with it. Such errors show up as holes of infinite depth on objects that were moving during training. A third problem is that computing the loss at every decoder scale leaves holes in low-texture regions and copies texture into the depth.
Three changes to the photometric loss
The key idea is to keep the usual photometric training and change how the loss combines views, masks pixels and handles scales. The authors present these as three changes that together give large gains in monocular depth estimation.
The first change replaces the average over source views with a per-pixel minimum, so each pixel is matched only to views where it is visible. The final per-pixel loss is written as \(L_p = \min_{t'} pe(I_t, I_{t'\to t})\), where \(pe\) is the photometric error. The photometric error \(pe\) combines an SSIM term with an L1 term, as \(pe(I_a,I_b) = \frac{\alpha}{2}(1-\text{SSIM}(I_a,I_b)) + (1-\alpha)\lVert I_a-I_b\rVert_1\), with \(\alpha = 0.85\).
The authors report that this reduces artifacts at image borders and sharpens occlusion boundaries.
The second change is a binary mask \(\mu\) that keeps a pixel only if its warped reprojection error is lower than its unwarped error. The mask is \(\mu = [\min_{t'} pe(I_t, I_{t'\to t}) < \min_{t'} pe(I_t, I_{t'})]\), where the brackets are the Iverson bracket. It is computed on the forward pass rather than learned, so stationary pixels drop out of the loss without an extra network.
The third change moves the loss to full input resolution instead of each decoder layer's own resolution. Each intermediate depth map is upsampled to the input resolution, then reprojected and compared there, so every scale targets the same high-resolution image. The authors describe this as matching whole patches, since a low-resolution disparity moves a block of high-resolution pixels together.
The smoothness term penalizes gradients of the mean-normalized inverse depth \(d_t^*\), with the penalty weakened where image gradients are large. The total loss is \(L = \mu L_p + \lambda L_s\) with \(\lambda = 0.001\), averaged over pixels, scales and the batch.
Network and training setup
The sigmoid output \(\sigma\) becomes depth through \(D = 1/(a\sigma + b)\), with \(a\) and \(b\) chosen to keep depth between 0.1 and 100 units.
The encoder starts from ImageNet weights, which the authors say helps the compact model compared with training from scratch. The decoder uses reflection padding instead of zero padding, so samples outside the image take the nearest border pixel. The pose network is a ResNet18 that takes six stacked channels and predicts one 6-DoF relative pose, and it is used only during training.
The color augmentations touch only the images fed to the networks, not the images used to compute the loss. The monocular subset has 39,810 triplets for training after static frames are removed.
KITTI Eigen results
On the Eigen split the monocular Monodepth2 model scores 0.115 Abs Rel, compared to 0.183 for Zhou et al. For monocular models, depth is scaled per image with the median of the ground truth, and depth is capped at 80m. The table marks Zhou et al. as newer results taken from the authors' GitHub, so that row is not a like-for-like rerun.
Stereo supervision alone gives 0.109 Abs Rel, and joint monocular plus stereo gives 0.106, both without median scaling. Stereo training gets its scale from the known camera baseline, so it doesn't need the median step. The authors state that the monocular model outperforms earlier self-supervised methods in the table.
Without ImageNet pretraining the monocular model scores 0.132 Abs Rel, which is still below the 0.183 for Zhou et al. Against SuperDepth at 1024x384, the stereo model is trained for 20 epochs instead of 200 epochs and uses no post-processing. The authors also report that the stereo-only results are strong, although the contributions were designed for monocular training.
Which changes matter in the ablation
The baseline without the three changes scores 0.140 Abs Rel, and the full model scores 0.115 under the same monocular training. Adding only the minimum reprojection loss lowers the baseline to 0.122, and adding only auto-masking lowers it to 0.124. Each change helps alone, and the full combination gives the lowest Abs Rel in the ablation table.
Within the full model, removing auto-masking raises Abs Rel to 0.120, the largest rise among the three removals. Removing the minimum reprojection loss or the full-resolution multi-scale formulation gives 0.117 in each case, against 0.115 for the full model. Replacing auto-masking with the predictive mask of Zhou et al. gives 0.123, which is worse than removing auto-masking entirely.
The authors read this as the predictive mask hurting results, while their auto-masking improves them in every case.
The authors trained these models for 30 epochs to ensure convergence, so the pretraining gap is tied to that budget.
Training on the full Eigen split
The full Eigen split keeps sequences where the data capture car is stopped, which can cause trouble for monocular training. With those frames kept, the baseline scores 0.146 Abs Rel and the full model scores 0.116. The authors say their improvement over the baseline grows in this setting, compared with the filtered subset used by Zhou et al.
Transfer to Make3D
Models trained on KITTI are evaluated on Make3D, where Monodepth2 trained on monocular video scores 0.322 Abs Rel, compared to 0.383 for Zhou et al. The authors say they outperform the methods that do not use depth supervision under the evaluation criteria of Monodepth.
The authors warn that Make3D ground truth and input images are not well aligned, which may cause evaluation issues. The evaluation uses a center crop with a 2x1 ratio, and median scaling is applied to the monocular model.
Limits of the approach
The main failure is objects that break the Lambertian appearance assumption, such as distorted, reflective and color-saturated regions. The authors also note that boundaries that are ambiguous or shapes that are intricate can be missed.
The depth benchmarks reported here are KITTI and Make3D, and the Make3D alignment problem limits what its numbers can show. Higher-resolution and post-processed results are kept in the supplementary material, so the main table shows results without post-processing.
Paper info
- Authors
- Clément Godard, Oisin Mac Aodha, Michael Firman, Gabriel Brostow
- Venue
- arXiv · Preprint
- First published
- 2018-6-4
- Added
- 2026-11-12
- Updated
- 2019-8-17
- Version
- v4
- arXiv
- 1806.01260
- Category
- cs.CV · stat.ML
- Original paper terms
- arXiv non-exclusive 1.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Clément Godard, Oisin Mac Aodha, Michael Firman, Gabriel Brostow (2018). Digging Into Self-Supervised Monocular Depth Estimation. arXiv:1806.01260v4. https://arxiv.org/abs/1806.01260v4
BibTeX
@misc{godard2018digging,
title = {{Digging Into Self-Supervised Monocular Depth Estimation}},
author = {Clément Godard and Oisin Mac Aodha and Michael Firman and Gabriel Brostow},
year = {2018},
eprint = {1806.01260},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1806.01260v4}
}