Abstract
Fitting model parameters to a set of noisy data points is a common problem in computer vision. In this work, we fit the 6D camera pose to a set of noisy correspondences between the 2D input image and a known 3D environment. We estimate these correspondences from the image using a neural network. Since the correspondences often contain outliers, we utilize a robust estimator such as Random Sample Consensus (RANSAC) or Differentiable RANSAC (DSAC) to fit the pose parameters. When the problem domain, e.g. the space of all 2D-3D correspondences, is large or ambiguous, a single network does not cover the domain well. Mixture of Experts (MoE) is a popular strategy to divide a problem domain among an ensemble of specialized networks, so called experts, where a gating network decides which expert is responsible for a given input. In this work, we introduce Expert Sample Consensus (ESAC), which integrates DSAC in a MoE. Our main technical contribution is an efficient method to train ESAC jointly and end-to-end. We demonstrate experimentally that ESAC handles two real-world problems better than competing methods, i.e. scalability and ambiguity. We apply ESAC to fitting simple geometric models to synthetic images, and to camera re-localization for difficult, real datasets.
Introduction
Camera re-localization—estimating the 6D pose (position and orientation) of a camera from a single image—is a foundational task for robotics and augmented reality. A popular modern approach is scene coordinate regression, where a neural network predicts the 3D location of every pixel in the image. These 2D-3D correspondences are then fed into a robust estimator like RANSAC to calculate the camera's pose.
However, this approach faces significant challenges in large-scale or ambiguous environments. A single network has limited capacity and struggles to learn the geometry of massive, multi-room environments. Furthermore, repetitive structures (e.g., identical office hallways) often lead to "averaged" or confused predictions, causing localization failure. While "Mixture of Experts" (MoE) models offer a potential solution by specializing networks for different areas, they typically rely on a "gating network" to pick a single best expert. A single error in gating leads to total system failure.
Methodology
The authors introduce Expert Sample Consensus (ESAC), which integrates Differentiable RANSAC (DSAC) into an MoE framework to overcome these limitations.
ESAC departs from traditional "hard" selection gating. Instead, it treats the gating network's output as a probability distribution, distributing a fixed budget of $N$ pose hypotheses (e.g., 256) among multiple experts. If the gating network is uncertain between two locations, hypotheses are allocated to both. Each expert generates its assigned share of 3D coordinate predictions, and ESAC pools all resulting pose hypotheses. A "soft inlier count" (geometric consistency) is then used to arbitrate the final pose, allowing the 3D geometry to "veto" incorrect gating decisions.
A key technical contribution is the derivation of an efficient method to train the entire ensemble—both experts and the gating network—jointly and end-to-end. By minimizing the "expected task loss," the gating network is encouraged to allocate more budget to experts that produce accurate poses.
Key Insights and Ideas
The core strength of ESAC lies in the principle that geometry is the ultimate truth. While the gating network, which relies on global image context, might be deceived by visual similarities, the RANSAC stage evaluates 3D geometric consistency, which is much harder to trick.
By distributing hypotheses rather than making a single choice, the loss function becomes smoother, facilitating better learning during backpropagation. Additionally, ESAC offers efficiency through specialization; at test time, it only executes forward passes for experts receiving a significant hypothesis budget, achieving better accuracy than monolithic networks while remaining computationally efficient.
Experimental Results
ESAC was evaluated on several benchmarks, including standard indoor datasets (7Scenes, 12Scenes) and a new, more challenging 19Scenes dataset designed to test scalability and ambiguity.
- Superior Scalability: On the 19Scenes dataset, ESAC achieved 88.1% accuracy (within 5cm/5°), significantly outperforming the previous state-of-the-art monolithic model (DSAC++), which dropped to 53.3%.
- Ambiguity Handling: In cases where the gating network was confused, ESAC's classification accuracy reached 98.7%, compared to only 53.0% for a standard "hard selection" MoE.
- Outdoor Performance: ESAC significantly outperformed DSAC++ on the Aachen Day dataset, moving from 34% to 75.5% accuracy at the 5m/10° threshold.
- Efficiency: On the 19Scenes dataset, ESAC processed images in roughly 550ms on a single GPU, evaluating an average of 6.1 experts per image.
Conclusion and Future Work
While ESAC represents a major advancement for dense coordinate regression, it still trails behind classical sparse feature-based methods on extremely large outdoor datasets, which are currently better at handling high outlier ratios. Furthermore, performance is sensitive to the quality of the 3D models used for training. If the underlying SfM reconstruction is noisy, the network struggles to learn a consistent geometric mapping. Future work will focus on developing training strategies more resilient to noisy ground truth coordinates from automated 3D reconstruction tools.
Summary updated