RANSAC Scoring Done Right

James Pritts, Felix Seegräber, Kevin Köser, [email protected], [email protected] · 2026

Read RANSAC Scoring Done Right by James Pritts, Felix Seegräber, Kevin Köser, [email protected], [email protected] (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2606-27385.txt.

Introduction

Pritts, Seegräber, and Köser remove the hidden scale parameter from RANSAC, the workhorse algorithm for fitting geometric models amid outliers. Standard scoring counts inliers or sums capped per-point scores, and every variant needs a threshold tied to the inlier scale, which itself must be guessed from contaminated data. Their fix reverses the inference order: the scale is integrated out analytically under a conjugate prior for a fixed inlier partition, and only then are partitions optimised. One closed-form score spans both regimes in this computer vision paper from 2026.

On a benchmark of nearly seventy thousand image pairs, the score beats the leading variants across two-view estimation problems. It stays nearly flat when thresholds are miscalibrated, where baselines degrade. Near-optimal accuracy arrives from as little as two validation pairs, where baselines need roughly a hundred times more.

Catalog record

CREATORJames Pritts, Felix Seegräber, Kevin Köser, [email protected], [email protected]
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE70 KB
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2606.27385

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

RANSAC Scoring Done Right James Pritts, Felix Seegräber, Kevin Köser, [email protected], [email protected] Abstract The most widely used RANSAC variants score candidate models by counting inliers or summing per-point scores that saturate beyond a residual threshold. Every such score requires a user-supplied parameter that is a function of the inlier scale, which must itself be estimated from contaminated data. We remove this dependence by reversing the usual order of inference: rather than estimating the scale and then scoring against it, we marginalize σ \sigma analytically in closed form under a conjugate Inverse-Gamma prior for a fixed inlier partition, then optimize over partitions. A single closed-form expression spans the non-informative Jeffreys limit and informative empirical-Bayes priors, so the same score adapts across data-rich and data-scarce regimes without any change to the algorithm. The proposed RANSAC score is the first in which the inlier scale is genuinely absent from the formula. The score admits O ⁡ ( N ​ log ⁡ N ) O(N\log N) computation via sort-and-sweep. On a benchmark of nearly 70 000 70\,000 image pairs spanning different two-view estimation problems and both engineered and learned feature pipelines, the proposed score exceeds the state of the art (RANSAC, MSAC, GaU, MAGSAC++): it stays nearly flat under threshold miscalibration where baselines degrade, reaches near-optimal accuracy from as few as two validation pairs where baselines need ∼ 100 × {\sim}100\times more, and tightens its prior regularization as validation data grows scarce. 1 1 1 Code will be released upon acceptance. 1 Introduction RANSAC [ 11 ] scores candidate geometric models by evaluating how well they explain the observed data in the presence of outliers. Every widely used scoring function, whether inlier counting (RANSAC), truncated squared error (MSAC [ 21 ] ), or the Gaussian-Uniform marginal likelihood (MLESAC [ 22 ] ), depends on a hyperparameter that has an implicit dependence on the inlier scale. The user must either supply this quantity or estimate it from contaminated data, neither of which is straightforward in practice. Shekhovtsov [ 20 ] provides a unifying analysis of these scoring functions through the lens of a single probabilistic model: the Gaussian-Uniform (GaU) mixture, in which each inlier residual follows a Gaussian density and each outlier is uniform. Within this framework, MSAC is the profile likelihood (maximizing over latent inlier labels) and MLESAC is the marginal likelihood (summing over labels); the two differ only in replacing a hard \max with a soft maximum. Both are parameterized by a decision threshold \tau that is itself a quantile of the inlier scale, \tau=q\,\sigma for a fixed quantile factor q : tuning \tau is equivalent to tuning \sigma in different units. We call scores of this form threshold-based . MAGSAC [ 3 ] and MAGSAC++ [ 4 ] were introduced specifically to remove this dependence by “marginalizing” over \sigma under a uniform prior \sigma\sim\mathcal{U}[0,\bar{\sigma}] . Shekhovtsov [ 20 ] deconstructs the derivation and identifies three errors (an inlier density that assigns zero likelihood to the ground-truth model, an event probability equated with a density value, and IRLS weights chosen first and integrated into a score rather than derived from one) that cancel by numerical coincidence, leaving a score numerically equivalent to GaU at fixed \bar{\sigma} . The hyperparameter the user actually sets is \tau=\kappa\,\bar{\sigma} for a truncation quantile \kappa , so MAGSAC++ does not in fact remove the inlier-scale parameter: it replaces \sigma with a proxy hyperparameter in disguise ( Appendix B ). Moreover, Shekhovtsov’s experiments show that when the threshold is properly tuned, all of these scoring functions (MSAC, GaU, MAGSAC++, and even a learned per-scene score) perform identically for model selection. Only vanilla inlier counting is measurably worse. The bottleneck is not the choice of scoring function but the dependence on a well-chosen inlier-scale quantile. We extend this finding: the threshold-based baselines (with the exception of vanilla RANSAC) not only tie at their respective optima but exhibit the same characteristic degradation as the hyperparameter is perturbed and the same dependence on validation-set size (Figs. 1 , 2 ). The proposed score breaks this pattern, evidencing a structural difference from the threshold-based family. We propose a scoring framework that genuinely eliminates the inlier scale. The key idea is to reverse the usual elimination order. The scores above first remove the latent inlier/outlier labels (by summation in the marginal likelihood or by maximization in the profile likelihood), leaving a score that still depends on a quantile of \sigma . We instead marginalize \sigma analytically under a conjugate Inverse-Gamma prior given a fixed inlier partition; the non-informative Jeffreys prior arises as a limiting case of this Inverse-Gamma family, so the same closed form covers both informative and non-informative priors. A single score therefore adapts to data availability without any change to the algorithm: an empirical-Bayes prior fit from a small validation set when labelled data exists, and the Jeffreys limit, which needs no validation data at all, when it does not. We then optimize over partitions, which requires only a sort over residuals. The resulting scale-free marginal score is a closed-form expression involving the residual sum of squares, the inlier count, and the outlier domain half-width a ( Section 3 ), and admits O(N\log N) computation via a sort-and-sweep algorithm. Crucially, a is not a relabelled inlier scale: it parameterizes the outlier component of the mixture and is not tied by any quantile relation to the inlier scale. After marginalization the inlier scale is genuinely absent from the formula; this is the structural sense in which our score is the first in the RANSAC family to properly marginalize \sigma , and, where the per-pair inlier count is large enough for the data to dominate the prior, the score is markedly less sensitive to a than threshold-based scores are to their hyperparameter. We validate these claims at scale on nearly 70\,000 image pairs spanning homography, essential-, and fundamental-matrix estimation with both engineered (RootSIFT) and learned (SuperPoint+LightGlue) feature pipelines ( Section 4 ). The score matches the best-tuned threshold-based baselines at their optima while being far more robust to threshold miscalibration where the data informs the scale and reaching near-optimal accuracy from as few as two validation pairs, where the baselines need {\sim}100\times more. 2 Probabilistic Model for Robust Fitting Consider N observations \{\mathbf{x}_{i}\}_{i=1}^{N} and a candidate geometric model \theta\in\mathbb{R}^{n_{\theta}} . Each observation imposes d_{g} algebraic constraints \mathbf{g}(\mathbf{x}_{i},\theta)=\mathbf{0} ; the minimal sample size is m=\lceil n_{\theta}/d_{g}\rceil ( Table 1 in the supplement lists (n_{\theta},d_{g},m) for common models). We adopt the standard two-component mixture [ 22 , 20 ] : a latent label z_{i}\in\{0,1\} marks observation i as inlier ( z_{i}{=}1 ) or outlier ( z_{i}{=}0 ) with prior \Pr(z_{i}{=}1)=\gamma , and the residual \mathbf{r}_{i}\in\mathbb{R}^{d_{g}} (an algebraic residual vector, e.g. a Sampson-type residual) has conditional density p(\mathbf{r}_{i}\mid z_{i},\theta,\sigma)=\begin{cases}p_{\mathrm{in}}(\mathbf{r}_{i};\sigma)\coloneqq(2\pi\sigma^{2})^{-d_{g}/2}\,\exp\!\bigl({-}\|\mathbf{r}_{i}\|^{2}/2\sigma^{2}\bigr)&z_{i}=1,\\[3.0pt] p_{\mathrm{out}}\coloneqq(2a)^{-d_{g}}&z_{i}=0,\end{cases} (1) a Gaussian inlier density and a uniform outlier density on [-a,a]^{d_{g}} ; the half-width a has the same units as \sigma (e.g. pixels for a Sampson-type distance). By independence, the joint density of residuals and labels \mathbf{z}=(z_{1},\ldots,z_{N}) factorizes as p(\mathbf{r},\mathbf{z}\mid\theta,\sigma)=\prod_{i=1}^{N}\bigl[\gamma\,p_{\mathrm{in}}(\mathbf{r}_{i};\sigma)\bigr]^{z_{i}}\,\bigl[(1{-}\gamma)\,p_{\mathrm{out}}\bigr]^{1-z_{i}}. (2) Maximizing ( 2 ) over labels classifies z_{i}^{*}=1 iff \gamma\,p_{\mathrm{in}}(\mathbf{r}_{i};\sigma)>(1{-}\gamma)\,p_{\mathrm{out}} ; collecting positive labels defines the inlier set \mathcal{I}\coloneqq\{i:z_{i}^{*}=1\} with complement \mathcal{O}=\{1,\ldots,N\}\setminus\mathcal{I} , and n_{I}=|\mathcal{I}| , n_{O}=|\mathcal{O}| . This per-point rule is the profile-likelihood labeling

Read the complete text