Guided Stereo Matching

Matteo Poggi, Davide Pallotti, Fabio Tosi, Stefano Mattoccia · DOI

Abstract

Stereo is a prominent technique to infer dense depth maps from images, and deep learning further pushed forward the state-of-the-art, making end-to-end architectures unrivaled when enough data is available for training. However, deep networks suffer from significant drops in accuracy when dealing with new environments. Therefore, in this paper, we introduce Guided Stereo Matching, a novel paradigm leveraging a small amount of sparse, yet reliable depth measurements retrieved from an external source enabling to ameliorate this weakness. The additional sparse cues required by our method can be obtained with any strategy (e.g., a LiDAR) and used to enhance features linked to corresponding disparity hypotheses. Our formulation is general and fully differentiable, thus enabling to exploit the additional sparse inputs in pre-trained deep stereo networks as well as for training a new instance from scratch. Extensive experiments on three standard datasets and two state-of-the-art deep architectures show that even with a small set of sparse input cues, i) the proposed paradigm enables significant improvements to pre-trained networks. Moreover, ii) training from scratch notably increases accuracy and robustness to domain shifts. Finally, iii) it is suited and effective even with traditional stereo algorithms such as SGM.

Introduction

Stereo matching—calculating depth by comparing two slightly offset images—is a cornerstone of computer vision. While modern deep learning models (CNNs) have mastered this on paper, they suffer from "domain shift": a network trained on synthetic data often fails when encountering real-world complexities like reflections or low-light conditions.

"Guided Stereo Matching" introduces a way to significantly boost the accuracy of these networks by feeding them a tiny amount of sparse, reliable depth data (e.g., from a LiDAR). By "nudging" the network’s internal features toward these known values, the authors drastically reduce errors caused by domain shift. This approach bridges the gap between high-accuracy but sparse active sensors (LiDAR) and dense but sometimes unreliable passive stereo cameras.

Methodology

The core innovation is a Feature Enhancement technique. Most stereo networks build an internal "cost volume"—a multi-dimensional structure that stores how well pixels from the left and right images match at various possible depths (disparities).

Instead of just "fusing" the LiDAR data at the very end, the authors inject it directly into this cost volume using a Gaussian modulation function. If a sparse sensor indicates a pixel has a disparity $d$, the method creates a Gaussian curve centered at $d$. It then multiplies the network's internal features by this curve. Features corresponding to the "correct" depth are boosted, while features at incorrect depths are dampened.

Gaussian modulation of internal features.

Because this modulation is differentiable, it can be used both at test time to improve pre-trained models and during training to teach models how to effectively utilize external hints. This formulation is general enough to work with correlation-based architectures (like iResNet), 3D convolution-based architectures (like PSMNet), and even traditional algorithms like Semi-Global Matching (SGM).

Experiments and Key Insights

The method was validated across rigorous benchmarks including SceneFlow (synthetic), KITTI 2012 & 2015 (outdoor driving), Middlebury v3 (indoor), and ETH3D.

A key finding is that guidance acts as an "anchor." When a network trained only on synthetic data sees a real-world image, it usually gets confused. However, with just 5% density of sparse hints, the network "recovers" its reasoning, performing nearly as well as if it had been specifically fine-tuned on real data. While applying guidance to pre-trained models helps, training a model from scratch to expect these hints is even more effective, as the network learns to rely on hints in difficult areas (like shadows) while using image context elsewhere.

Key Results

The proposed paradigm leads to massive error reductions. On the KITTI 2015 benchmark, an iResNet model trained on synthetic data saw its error rate drop from 11.95% to 8.21% with 5% guidance at test time. When the model was trained with guidance, the error plummeted to 3.66%.

Comparison of error rates without (b) and with (c) guided matching in a challenging tunnel scene.

On the challenging Middlebury dataset, the PSMNet model's average error dropped from 5.33 pixels to 1.73 pixels when trained with guidance. Even the classic SGM algorithm saw its average error on KITTI 2015 drop from 2.22 pixels to 1.68 pixels using the same strategy.

Limitations and Future Work

The method currently relies on a source of sparse depth, which may not always be available. Furthermore, the sparse points in this study were chosen randomly. Future work could involve selecting points based on confidence measures—strategically picking points where the stereo network is most "confused" to provide the most helpful hints. Determining the optimal density for different sensor types also remains an open area for exploration.

Summary updated

BibTeX
@inproceedings{poggi2019guided,
  author = {Matteo Poggi and Davide Pallotti and Fabio Tosi and Stefano Mattoccia},
  title = {{Guided Stereo Matching}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2019},
  doi = {10.1109/cvpr.2019.00107},
}
Figure