MAGSAC++, a Fast, Reliable and Accurate Robust Estimator

Dániel Baráth, Jana Nosková, Maksym Ivashechkin, Jiřı́ Matas

Introduction

Robust estimation is a fundamental component of computer vision, essential for fitting geometric models—such as camera motion or planar surfaces—to data contaminated by noise and outliers. The traditional gold standard, RANSAC, relies heavily on a user-defined inlier-outlier threshold ($\sigma$). Incorrect tuning of this parameter often leads to estimation failure. While the original MAGSAC (Marginalizing Sample Consensus) addressed this by marginalizing over a range of noise scales, it was computationally burdensome.

MAGSAC++ represents a significant evolution, eliminating the need for a hard-coded threshold while operating up to an order of magnitude faster than its predecessor. By reformulating marginalization and introducing a novel sampling strategy, it achieves state-of-the-art performance in both speed and accuracy.

Methodology

The efficiency and robustness of MAGSAC++ stem from two primary innovations:

Marginalization via IRLS

The authors reformulate the complex marginalization procedure of the original MAGSAC into an Iteratively Re-weighted Least Squares (IRLS) problem. By deriving a new model quality function, the algorithm calculates weights for every data point based on marginalized likelihood. This "threshold-free" approach provides the accuracy of marginalization with the computational efficiency of a standard weighted least-squares solver.

Progressive NAPSAC (P-NAPSAC)

Standard sampling strategies often struggle when inliers are neither purely global nor strictly local. P-NAPSAC addresses this by exploiting the spatial coherence typically found in real-world images. It begins by sampling from small, local neighborhoods and progressively "grows" these regions until reaching a global sampling scale. This allows the algorithm to rapidly identify local structures, such as a specific plane in a complex scene, without the degeneracy issues associated with purely local samplers. To maintain efficiency, a multi-layer grid based on hash-maps enables $O(1)$ neighborhood calculations.

Experimental Evaluation

MAGSAC++ was rigorously tested across diverse datasets, including indoor scenes (TUM), driving sequences (KITTI), wide-baseline reconstructions (Tanks and Temples), and crowdsourced landmarks (Community Photo Collection). It was also evaluated on homography fitting using the ExtremeView dataset (EVD), which features significant perspective shifts and zooms.

Examples of feature matching from the Community Photo Collection and ExtremeView datasets, illustrating the types of complex geometric challenges MAGSAC++ addresses.

Performance Highlights

  • Speed: MAGSAC++ is frequently 10x faster than the original MAGSAC. For instance, on the KITTI dataset, it achieved a median processing time of 8ms, comparable to standard MSAC (10ms) but significantly faster than the original MAGSAC (117ms).
  • Accuracy and Reliability: The method consistently yielded the lowest median geometric error. On the challenging EVD dataset, it achieved a median RMSE of 2.6 pixels (compared to RANSAC's 4.0) and a significantly lower failure rate of 10.4% compared to the next best non-MAGSAC method, GC-RANSAC (18.3%).

Conclusion and Future Work

MAGSAC++ demonstrates remarkable stability even when the maximum noise scale parameter ($\sigma_{max}$) is set to a high, "safe" value. While it still assumes some degree of spatial coherence for maximum speed gains, its ability to blend local and global sampling makes it robust to varied scene structures. Future research may involve integrating this IRLS-based formulation into end-to-end trainable deep learning pipelines for feature matching.

Summary updated

Abstract

A new method for robust estimation, MAGSAC++ <sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">1</sup> , is proposed. It introduces a new model quality (scoring) function that does not require the inlier-outlier decision, and a novel marginalization procedure formulated as an M-estimation with a novel class of M-estimators (a robust kernel) solved by an iteratively re-weighted least squares procedure. We also propose a new sampler, Progressive NAPSAC, for RANSAC-like robust estimators. Exploiting the fact that nearby points often originate from the same model in real-world data, it finds local structures earlier than global samplers. The progressive transition from local to global sampling does not suffer from the weaknesses of purely localized samplers. On six publicly available realworld datasets for homography and fundamental matrix fitting, MAGSAC++ produces results superior to the state-of-the-art robust methods. It is faster, more geometrically accurate and fails less often.
BibTeX
@inproceedings{barath2020magsac,
  author = {Dániel Baráth and Jana Nosková and Maksym Ivashechkin and Jiřı́ Matas},
  title = {{MAGSAC++, a Fast, Reliable and Accurate Robust Estimator}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2020},
  doi = {10.1109/cvpr42600.2020.00138},
}
Figure