Abstract
We present a novel method to train machine learning algorithms to estimate scene depths from a single image, by using the information provided by a camera's aperture as supervision. Prior works use a depth sensor's outputs or images of the same scene from alternate viewpoints as supervision, while our method instead uses images from the same viewpoint taken with a varying camera aperture. To enable learning algorithms to use aperture effects as supervision, we introduce two differentiable aperture rendering functions that use the input image and predicted depths to simulate the depth-of-field effects caused by real camera apertures. We train a monocular depth estimation network end-to-end to predict the scene depths that best explain these finite aperture images as defocus-blurred renderings of the input all-in-focus image.
Introduction
Estimating 3D depth from a single 2D image—monocular depth estimation—is a fundamental challenge in computer vision with significant implications for robotics and computational photography. Traditional training approaches typically rely on direct supervision from sensors like LiDAR or multi-view supervision from stereo pairs. However, these methods often suffer from low resolution, noise, or failure on textureless surfaces.
This research introduces aperture supervision, a third cue that utilizes defocus blur. By comparing all-in-focus images (taken with a small aperture) to shallow depth-of-field images (taken with a large aperture), a model can learn to predict depth based on how objects blur relative to their distance from the focal plane.
Methodology
The core of this approach is the integration of differentiable aperture rendering into the machine learning pipeline. The authors propose two primary models to transform a predicted depth map and an all-in-focus image into a synthetic blurry image:
- The Light Field Model: This model treats the camera as a 4D light field, warping the input image into virtual viewpoints within the aperture. While computationally expensive, it is geometrically accurate and handles occlusions effectively.
- The Compositional Model: This model approximates the scene as discrete depth layers, blurring the image with varying kernel sizes. It is significantly faster but can struggle with complex foreground occlusions.
To ensure predicted depth maps align with physical edges in the image, the researchers incorporated a differentiable bilateral solver, which helps handle depth ambiguities in smooth regions.
Key Results and Insights
The network is trained via consistency: it seeks the depth map that, when used to render a synthetic blur, best matches a real-world shallow depth-of-field photo. This task-specific optimization results in depth maps that are particularly well-suited for synthetic "Portrait Mode" applications.
Quantitative evaluations on Light Field and DSLR datasets show that aperture supervision outperforms multi-view supervision and direct image regression in terms of PSNR and SSIM. Qualitatively, the resulting depth maps are sharper and show better edge alignment than state-of-the-art models trained on Kinect data.
Conclusion
While challenges remain regarding occlusion handling and the inherent "front-vs-back" sign ambiguity of defocus blur, aperture supervision provides a powerful new signal for depth estimation. It is a complementary technique that could be combined with existing multi-view and direct supervision methods to create more robust depth estimation pipelines.
Summary updated