Introduction
Robust geometric estimation is a cornerstone of computer vision, with RANSAC (Random Sample Consensus) serving as the standard for filtering outliers in feature correspondences. While traditional RANSAC is agnostic to the source of correspondences, modern learning-based variants—which use neural networks to predict inlier probabilities—often suffer from a significant "generalization gap."
A model trained on correspondences from a handcrafted detector like SIFT typically fails when applied to data from deep-learning matchers like LoFTR, and vice versa. This failure stems from the distinct "noise signatures" (outlier distributions and precision levels) inherent to different matching algorithms. To address this, we introduce Monte Carlo Diffusion (MCD), a training paradigm that decouples the RANSAC model from specific feature matchers by simulating a vast, continuous spectrum of noisy data distributions.
Methodology: Decoupling via Diffusion
The core insight of MCD is that a RANSAC enhancer should learn underlying geometric consistency rather than the specific error patterns of a particular matcher. Instead of training on real matcher outputs, we propose a synthetic data generation pipeline based on a diffusion process.
The Training Pipeline
The process begins with ground-truth (GT) matches. We then apply a multi-stage randomization strategy to generate diverse training samples, as illustrated in the pipeline overview below.
- Match Diffusion: We progressively inject Gaussian noise into clean matches. By varying the diffusion "timestep" $t$, we transition clean data into pure noise, effectively simulating different levels of outlier contamination.
- Multi-Stage Randomization (MSR): To ensure the model encounters every possible noise configuration, we use Monte Carlo sampling to randomize three critical hyperparameters during each training iteration:
- Timestep ($t$): Controls the overall noise intensity.
- Diffusion Ratio ($r$): Determines the percentage of matches converted into outliers.
- Noise Scale ($s$): Adjusts the spatial magnitude of coordinate shifts.
- Validity Check: To maintain realistic image constraints, any points pushed outside the image boundaries by the diffusion process are replaced with random uniform noise.
By training on this "infinite" variety of synthetic noise, the model learns a generalized representation of geometric inliers that is not tied to any specific detector's quirks.
Experimental Results
The MCD approach was evaluated on the ScanNet (indoor) and MegaDepth (outdoor) benchmarks, using SIFT and LoFTR as representative feature matchers to test cross-distribution generalization.
Out-of-Distribution (OOD) Performance
The results demonstrate a substantial leap in generalization capability:
- SIFT to LoFTR: On ScanNet, a model trained exclusively on SIFT achieved an AUC@20° of 48.8% when tested on LoFTR. The MCD-trained model improved this to 60.8%, a 12% absolute gain without ever seeing a LoFTR match during training.
- LoFTR to SIFT: Conversely, a LoFTR-trained model managed only 8.5% AUC@20° on SIFT data. The MCD model achieved 26.2%, more than tripling the performance.
Competitive In-Distribution Performance
Crucially, this generalization does not come at the cost of specialized performance. MCD-trained models remain competitive with, and often outperform, models trained specifically on the target distribution. Furthermore, MCD significantly outperforms traditional robust estimators like MAGSAC++ on noisy data (e.g., 26.2% vs 5.4% AUC@20° on SIFT).
Conclusion
Monte Carlo Diffusion represents a paradigm shift in training robust estimators. By treating diffusion as a controlled "noise engine," we can synthesize training data that spans the entire distribution of potential real-world matchers. This decoupling allows learning-based RANSAC to achieve true generalizability, making it a more viable and robust tool for diverse computer vision applications.
Summary updated