NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Learning-based Framework for Hybrid Depth-from-Defocus and Stereo Matching

Zhang Chen, Xinqing Guo, Siyuan Li, Xuan Cao, Jingyi YuarXiv 2017

Abstract

Passive depth sensing is critical for various computer vision applications, yet traditional methods like Stereo Matching and Depth-from-Defocus (DfD) possess inherent, complementary limitations. This paper presents a unified deep learning framework, HG-Fusion-Net, which integrates these two modalities. By employing a stacked hourglass architecture with inter-branch feature exchange, the proposed method overcomes challenges such as repetitive textures and limited aperture size. Experimental results on synthetic and real-world datasets demonstrate that the hybrid approach significantly outperforms standalone stereo or DfD methods in both accuracy and robustness.

Introduction

Passive depth estimation typically relies on either multi-view geometry (Stereo Matching) or optical focus cues (Depth-from-Defocus). Stereo matching excels at long-range depth estimation but struggles with repetitive textures or edges parallel to the baseline. Conversely, DfD is effective for textured regions but is constrained by aperture size and distance. This research addresses the challenge of fusing these complementary cues into a single, efficient deep-learning pipeline, a task previously hindered by the lack of comprehensive datasets containing both stereo and defocused image pairs.

Methodology: HG-Fusion-Net

The core of the proposed framework is HG-Fusion-Net, an architecture built upon the Stacked Hourglass (HG) design. Unlike simple late-fusion approaches that average final outputs, HG-Fusion-Net facilitates early and mid-stage feature exchange between the stereo and DfD branches.

The HG-Fusion-Net architecture integrates Siamese network branches for defocus and stereo inputs, utilizing stacked hourglass modules for iterative feature refinement and cross-modal information exchange.

The network consists of two parallel Siamese branches that extract high-level features from the input pairs. These features are then processed through a series of hourglass modules. Using $1 \times 1$ convolutions, the branches exchange information at multiple resolutions, allowing the network to dynamically weigh the reliability of stereo versus defocus cues for each pixel. This iterative refinement process helps in smoothing noise while maintaining sharp object boundaries.

Dataset Generation and Training

To overcome the data scarcity for hybrid depth estimation, the authors developed a synthetic dataset using the FlyingThings3D library. By applying "Virtual DSLR" rendering—an occlusion-aware light field technique—they synthesized realistic defocused images from all-focus stereo pairs.

Synthetic training data examples showing the input image pairs (left), magnified crops highlighting noise and refinement (middle/right), and the corresponding ground truth disparity maps (bottom right).

A key finding during training was the necessity of Poisson noise. Models trained on noise-free synthetic data failed to generalize to real-world sensor data. Incorporating realistic noise into the synthetic pipeline was essential for achieving robust performance on captures from Lytro Illum and standard DSLR cameras.

Results and Discussion

Quantitative evaluation on synthetic data shows that HG-Fusion-Net achieves a Mean Absolute Error (MAE) of 0.87 pixels, a significant improvement over standalone stereo (1.05 px) and DfD (3.26 px). Qualitatively, the hybrid model excels in complex real-world scenes, successfully recovering fine structures like foliage or intricate toys where traditional methods often fail due to occlusion or lack of texture.

The framework's efficiency is also notable, with an inference time of approximately 0.38 seconds on an NVIDIA Tesla K80, making it viable for near-real-time applications.

Conclusion

By unifying Stereo Matching and DfD within a deep learning framework, this work demonstrates that cross-modal feature exchange is superior to simple output fusion. Future work will explore the use of focal stacks to further enhance DfD accuracy and the development of custom multi-lens hardware optimized for this hybrid sensing approach.

Summary updated

BibTeX
@misc{chen2017learning,
  author = {Zhang Chen and Xinqing Guo and Siyuan Li and Xuan Cao and Jingyi Yu},
  title = {{A Learning-based Framework for Hybrid Depth-from-Defocus and Stereo Matching}},
  year = {2017},
  eprint = {1708.00583},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1708.00583},
}
Figure