Abstract
Current methods for depth map prediction from monocular images tend to predict smooth, poorly localized contours for the occlusion boundaries in the input image. This is unfortunate as occlusion boundaries are important cues to recognize objects, and may lead to a way to discover new objects from scene reconstruction. To improve predicted depth maps, recent methods rely on various forms of filtering or predict an additive residual depth map to refine a first estimate. We instead learn to predict, given a depth map predicted by some reconstruction method, a 2D displacement field able to re-sample pixels around the occlusion boundaries into sharper reconstructions. Our method can be applied to the output of any depth estimation method, in an end-to-end trainable fashion. For evaluation, we manually annotated the occlusion boundaries in all the images in the test split of popular NYUv2-Depth dataset. We show that our approach improves the localization of occlusion boundaries for all state-of-the-art monocular depth estimation methods that we could evaluate, without degrading the depth accuracy for the rest of the images.
The Problem: Blurry Occlusion Boundaries
Monocular Depth Estimation (MDE)—predicting a 3D depth map from a single 2D image—is a cornerstone of computer vision. However, standard deep learning models tend to produce over-smoothed results. Specifically, they struggle with occlusion boundaries: the sharp edges where one object ends and another (or the background) begins.
In a perfect depth map, these should be crisp discontinuities. In reality, CNNs produce "halos" or blurry transitions. This isn't just an aesthetic issue; blurry edges ruin 3D reconstructions by creating "long tails" or "flying pixels" behind objects and make it impossible for Augmented Reality (AR) systems to realistically occlude virtual objects behind real ones.
Proposed Solution: 2D Displacement Fields
Instead of trying to predict a "residual" depth map (adding or subtracting values to fix the blur), the proposed model learns to move pixels. If a boundary is blurry, the model looks at a pixel on the edge and determines its true depth value by sampling from a nearby location.
Mathematical Shift
- Standard Residual: $D_{final} = D_{initial} + \Delta D$. This often causes overshooting or ringing artifacts at edges.
- Proposed Displacement: $D_{final}(p) = D_{initial}(p + \delta p)$. This re-samples the existing depth map, effectively "stitching" the depth map together by moving pixels from the foreground and background toward each other.
The architecture uses a light-weight encoder-decoder network with skip connections. It takes the initial depth map and the original RGB image as guidance to output a 2D vector field $(\delta x, \delta y)$ for every pixel. By using a Spatial Transformer Network approach, the process is fully differentiable and end-to-end trainable.
Datasets and Evaluation
To rigorously test boundary accuracy, the authors introduced NYUv2-OC++, a new set of manual occlusion boundary annotations for the 654 images in the NYUv2 test set. Automated edges derived from ground truth depth are often too noisy for precise evaluation. The method was also tested on the iBims dataset to ensure generalizability.
Key Results
The displacement field module is a "plug-and-play" solution agnostic to the underlying MDE model. It was tested on several state-of-the-art models (e.g., SharpNet, DORN, VNL) and showed consistent improvements:
- Boundary Accuracy: Localization improved for every method tested. For the Eigen et al. model, boundary error ($\epsilon_a$) dropped significantly from 9.936 to 2.168.
- Global Depth: Sharpening edges did not degrade global depth accuracy and, in many cases, slightly improved it.
- Efficiency: The module runs at 100 FPS on a GPU, making it faster than traditional post-processing filters like Bilateral Solvers or CRFs.
- 3D Reconstruction: Refined depth maps show a dramatic reduction in "flying pixels" behind objects, leading to much cleaner scene reconstructions.
Conclusion
By shifting the focus from depth value correction to pixel re-sampling via displacement fields, this method provides a robust and efficient way to sharpen occlusion boundaries in monocular depth estimation. While it depends on the initial depth map having reasonably accurate values in the neighborhood of the boundary, its speed and model-agnostic nature make it a powerful tool for improving 3D scene understanding and AR applications.
Summary updated