BANSAC: A dynamic BAyesian Network for adaptive SAmple Consensus

Valter Piedade, Pedro Miraldo · DOI

Abstract

Robust estimation is a fundamental task in computer vision, typically addressed by the Random Sample Consensus (RANSAC) algorithm. However, standard RANSAC often suffers from computational inefficiency due to its blind sampling strategy. This paper presents BANSAC, a novel approach that integrates a Dynamic Bayesian Network (DBN) into the RANSAC loop. BANSAC dynamically updates the inlier probability of every data point based on evidence gathered during model evaluation. These evolving scores guide weighted sampling and enable a more effective stopping criterion. Evaluations on benchmarks like PhotoTourism and HPatches show that BANSAC achieves superior accuracy and speed compared to existing state-of-the-art methods.

Introduction

Robust estimation is essential for applications ranging from image stitching to autonomous navigation. The classic RANSAC algorithm handles outliers by iteratively sampling minimal subsets of data to propose models. While effective, it is often a "brute force" process. Existing variants like PROSAC use static quality scores, which fail if initial priors are inaccurate.

BANSAC addresses this by giving RANSAC a "memory." It treats the inlier/outlier status of data points as states in a DBN, allowing the algorithm to learn the underlying data structure in real-time. As iterations progress, the algorithm gains a clearer picture of which matches are likely to be correct.

Evolution of inlier probabilities over iterations in BANSAC, showing how the algorithm progressively identifies correct matches.

Methods

The core of BANSAC is the Dynamic Bayesian Network (DBN) used to model the state of each data point.

Probabilistic Modeling and Online Updates

Each data point is represented as a node in the DBN. At each iteration $k$, the state of a point (inlier or outlier) depends on its previous states and the evidence from the current model evaluation. Unlike previous methods that only update sampled points, BANSAC harvests information from all points during the inlier counting phase.

The Dynamic Bayesian Network architecture used in BANSAC to update point probabilities recursively.

Weighted Sampling and Recursive Inference

The updated probabilities are used to bias the sampling process in subsequent iterations, favoring points that consistently align with proposed models. To maintain computational efficiency, BANSAC employs Markov assumptions (typically 1st-order), enabling recursive probability updates that do not scale linearly with the number of iterations.

Adaptive Stopping Criterion

BANSAC introduces a stopping criterion based on the accumulated probabilities. If the number of points with low inlier probability exceeds the current best outlier count, the algorithm terminates, as the likelihood of finding a significantly better model becomes negligible.

Experimental Results

BANSAC was evaluated on several standard benchmarks including CVPR IMW 2020 PhotoTourism for relative pose estimation and HPatches for homography estimation. Synthetic data was also used to test performance under varying inlier ratios.

Key Findings

  • Accuracy: In relative pose estimation, BANSAC achieved a mean Average Accuracy (mAA) of 0.610 (at 5°) in calibrated settings, outperforming standard RANSAC (0.568).
  • Efficiency: By identifying high-quality points early, BANSAC requires fewer iterations and often runs faster than competitors like PROSAC or USAC, especially when paired with local optimization.
  • Robustness: The method remains effective even with inlier ratios as low as 30%, where traditional methods often fail or become prohibitively slow.

Conclusion

BANSAC demonstrates that online learning via Dynamic Bayesian Networks can significantly enhance robust estimation. By treating every iteration as a source of evidence for all data points, it moves beyond blind sampling. While updating scores for every point introduces a minor overhead, the overall gains in speed and accuracy make it a powerful tool for real-world computer vision tasks.

Paper Citation: Valter Piedade and Pedro Miraldo. "BANSAC: A dynamic BAyesian Network for adaptive SAmple Consensus." arXiv:2309.08690v2 [cs.CV], 2023. Link to Code

Summary updated

BibTeX
@misc{piedade2023bansac,
  author = {Valter Piedade and Pedro Miraldo},
  title = {{BANSAC: A dynamic BAyesian Network for adaptive SAmple Consensus}},
  year = {2023},
  eprint = {2309.08690},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2309.08690},
}
Figure