Probabilistic Modeling of Disparity Uncertainty for Robust and Efficient Stereo Matching

Wenxiao Cai, Dongting Hu, Ruoyan Yin, Jiankang Deng, Huan Fu, Wankou Yang, Mingming Gong

TL;DR

This paper introduces a novel framework for stereo matching that successfully separates total uncertainty into data (aleatoric) and model (epistemic) components using a Bayes risk approach. By combining ordinal regression for data uncertainty with a post-process kernel regression on model embeddings, the framework delivers highly accurate and interpretable uncertainty maps efficiently, eliminating the need for computationally expensive repeated model training.

What Problem Does This Paper Address?

In stereo matching—the process of estimating depth from a pair of left and right images—understanding uncertainty is vital for safety-critical applications like autonomous driving and robotic navigation. If an autonomous vehicle knows its depth perception is unreliable (e.g., due to heavy fog or an unfamiliar environment), it can safely choose to slow down.

Uncertainty generally stems from two distinct sources:

  1. Data (aleatoric) uncertainty: Inherent noise in the data collection process (e.g., sensor noise, reflections, or poor lighting).
  2. Model (epistemic) uncertainty: Inadequacy or unfamiliarity of the trained model regarding specific out-of-distribution scenarios, which can theoretically be reduced by providing more training data.

Prior stereo matching methods typically lump these together into a single "total uncertainty" metric. Furthermore, traditional ways to isolate model uncertainty rely on deep ensembles or bootstrapping, which require retraining a network multiple times. This is computationally prohibitive for practical, real-time deployment. This paper tackles the challenge of robustly and efficiently disentangling these two forms of uncertainty.

Methods

The authors frame uncertainty quantification through the lens of Bayes risk decomposition. Instead of predicting a single disparity value directly, the network learns to model the entire probability distribution of the disparity.

Figure 2. Pipeline of the proposed stereo matching and uncertainty quantification method. Ordinal regression model is adopted to estimate PMF of disparity. Prediction is the expectation of PMF, and data uncertainty is PMF’s variance. The model is supervised by the ordinal label, using ordinal regression loss. Model uncertainty is estimated with a kernel regression model, which is fitted on the embeddings of OR model.

The architecture splits the task into two core components:

  • Data Uncertainty via Ordinal Regression (OR): The continuous range of possible disparities is discretized into $K$ bins. The network treats depth estimation as a series of binary classification tasks (i.e., "Is the disparity less than or equal to threshold $t_k$?"). The final disparity prediction is the mathematical expectation of this learned Probability Mass Function (PMF), while the data uncertainty is directly derived from the PMF's variance.
  • Model Uncertainty via Kernel Regression (KR): To avoid the massive computational overhead of deep ensembles, the authors introduce a clever shortcut. They apply a post-processing Kernel Regression model (using a Radial Basis Function kernel accelerated by K-Nearest Neighbors) directly onto the feature embeddings generated by the stereo matching backbone. The difference between this localized kernel estimator and the global model provides an analytical proxy for model uncertainty without requiring any model retraining.
  • Training on Small Uncertainty Data (TSUD): Leveraging their data uncertainty estimation, the authors introduce a data-filtering strategy. During training, the model identifies and masks out pixels with exceptionally high data uncertainty (the top 5%), preventing noisy ground-truth labels from misleading the network.

Datasets

The framework was evaluated on four widely accepted stereo matching benchmarks:

  • KITTI (2012 and 2015): Real-world automotive datasets containing challenging outdoor driving scenes.
  • Virtual KITTI 2: A synthetic clone of the KITTI dataset, useful for simulating clean environments and specific weather conditions like fog.
  • Scene Flow: A massive synthetic dataset featuring diverse pseudo-random 3D objects, commonly used for pre-training stereo networks.
  • DrivingStereo: A large-scale, high-resolution dataset containing over 170,000 stereo pairs from real-world driving scenarios.

To rigorously test model uncertainty, the authors intentionally trained their models on small subsets of these datasets to simulate data-scarce real-world conditions.

Key Insights and Ideas

  • The Power of Ordinal Discretization: Standard regression losses (like Smooth-$L_1$) only force the network to output a single average value, failing to capture the shape of the underlying distribution. By using ordinal regression, the network learns a richer probability distribution, allowing the variance to serve as a highly reliable indicator of data noise.
  • Embeddings Contain Uncertainty Clues: The most elegant realization in the paper is that a model's latent feature space inherently reflects its familiarity with a sample. Applying non-parametric kernel regression to these embeddings acts as a fast, mathematical proxy for how much the model's parameters would fluctuate if trained on different subsets of data.
  • Disentanglement Explains the "Why": Separating the two uncertainties provides actionable insights. High data uncertainty flags inherently ambiguous regions (like reflective glass or repetitive patterns), whereas high model uncertainty highlights novel geometries or textures where the model needs more training examples.

Key Results

The proposed method was evaluated using Endpoint Error (EPE) for disparity accuracy, and Area Under the Sparsification Error (AUSE) alongside 95% Confidence Interval (95CI) coverage for uncertainty quality.

  • Superior Uncertainty Quality: Across all benchmarks, the proposed method consistently achieved the lowest AUSE scores and the highest 95CI coverage. This indicates that the estimated uncertainty maps aligned tightly with actual prediction errors.
  • Massive Speedups: Compared to traditional model uncertainty methods like Wild Bootstrap (WBS) or Multiplier Bootstrap (MBS) which took roughly 12 hours to compute on the Scene Flow dataset, the proposed Kernel Regression method achieved comparable accuracy in just 1 minute.
  • Accuracy Boost via Filtering: Integrating the TSUD data-filtering strategy consistently improved depth accuracy. For instance, on the KITTI subset, adding TSUD reduced the EPE from 1.126 to 1.006, proving that filtering out highly uncertain data points yields a cleaner, more robust training signal.
Figure 3. Experimental results of KITTI [19] and Virtual KITTI [17]. Red box: Large error, small uncertainty—model fails to predict large errors. Orange box: Small error, large uncertainty—model is overly cautious. Green box: uncertainty aligns well with error.

Limitations and Future Work

While the framework demonstrates impressive efficiency gains, the authors note a few areas for expansion:

  • Downstream Integration: The paper focuses primarily on the generation of uncertainty maps. How these isolated data and model uncertainties can be optimally ingested by downstream planning and control modules in autonomous vehicles remains an open question.
  • Broader Impacts: The authors explicitly mention that the paper does not explore broader societal impacts, such as potential algorithmic biases or fairness issues inherent in the underlying datasets.

Summary updated

Abstract

Stereo matching plays a crucial role in various applications, where understanding uncertainty can enhance both safety and reliability. Despite this, the estimation and analysis of uncertainty in stereo matching have been largely overlooked. Previous works struggle to separate it into data (aleatoric) and model (epistemic) components and often provide limited interpretations of uncertainty. This interpretability is essential, as it allows for a clearer understanding of the underlying sources of error, enhancing both prediction confidence and decision-making processes. In this paper, we propose a new uncertainty-aware stereo matching framework. We adopt Bayes risk as the measurement of uncertainty and use it to separately estimate data and model uncertainty. We systematically analyze data uncertainty based on the probabilistic distribution of disparity and efficiently estimate model uncertainty without repeated model training. Experiments are conducted on four stereo benchmarks, and the results demonstrate that our method can estimate uncertainty accurately and efficiently, without sacrificing the disparity prediction accuracy.
BibTeX
@inproceedings{cai2024probabilistic,
  author = {Wenxiao Cai and Dongting Hu and Ruoyan Yin and Jiankang Deng and Huan Fu and Wankou Yang and Mingming Gong},
  title = {{Probabilistic Modeling of Disparity Uncertainty for Robust and Efficient Stereo Matching}},
  booktitle = {Pattern},
  year = {2024},
}
Figure