SteinPnP: Non-Parametric Uncertainty Quantification in the Perspective-N-Point Problem

Baptiste Lardinoit, Jongseok Lee, Andres Yubero, Seong Hun Lee, Javier Civera, Rudolph TriebelarXiv 2026 · arXiv

TL;DR

SteinPnP is a new probabilistic Perspective-N-Point (PnP) solver that uses a set of "particles" to represent the full 6-DoF camera pose distribution. By combining Stein Variational Inference with clever initialization and clustering techniques, it captures multiple valid pose hypotheses in ambiguous scenes—something traditional Gaussian-based solvers fail to do—while remaining significantly faster than standard sampling methods.

What Problem Does This Paper Address?

Estimating a camera's position and orientation (6-DoF pose) from 2D-3D point correspondences—the PnP problem—is a cornerstone of robotics and computer vision. However, visual data is often ambiguous. For example, a planar object like an AprilTag can look virtually identical from two different "mirrored" poses.

Most existing solvers provide a single "best" pose and, at most, a Gaussian uncertainty (a simple bell curve). This is problematic because if there are two equally likely poses, a Gaussian solver might pick one with overconfidence or average them into a physically impossible middle ground. While Markov Chain Monte Carlo (MCMC) methods can represent these complex, "multimodal" distributions, they are far too slow for real-time robotic applications.

Methods

The authors introduce SteinPnP, which leverages Stein Variational Newton (SVN). SVN is an optimization-based approach that iteratively transports a set of particles to approximate a target probability distribution. To make this work for the specific challenges of PnP, the authors introduced several key "remedies":

  1. Randomized P3P Initialization: To ensure particles don't all get stuck in one spot (mode collapse), they initialize the ensemble using multiple P3P (Perspective-3-Point) solutions from noisy subsets of the data.
  2. Tree-Based Mode Clustering: After an initial optimization, they use a Minimum Spanning Tree (MST) to group particles into distinct pose hypotheses (modes).
  3. Mode Mass Refinement: They use importance sampling to calculate the relative "weight" of each mode and resample particles accordingly. This ensures the final distribution correctly reflects which pose is more likely.
  4. Staged Updates: To keep things fast, they use a simplified "residual-only" update for most iterations and only perform the full, computationally expensive gradient calculations at the very end.
Figure 1: SteinPnP captures the bimodal (two-peak) distribution of an ambiguous AprilTag observation, whereas the Gaussian method (DLSU) is overconfident in a single peak.

Datasets

The researchers evaluated SteinPnP against several state-of-the-art solvers (MLPnP, EPnPU, DLSU) and "gold standard" samplers (Dynesty, EMCEE) using:

  • Synthetic Data: 1,800 coplanar (ambiguous) and 600 non-planar (unambiguous) scenarios with varying noise levels.
  • TUM RGB-D: A standard real-world dataset for evaluating camera tracking in non-planar scenes.
  • AprilTag Sequence: A real-world sequence specifically designed to exhibit persistent planar ambiguity as the camera moves.

Key Insights and Ideas

  • Gaussian Assumptions are Fragile: In planar scenes, the true pose distribution is often bimodal. Gaussian solvers (like DLSU) fail to represent this, leading to potentially catastrophic failures in downstream tasks like robot navigation.
  • SVI Needs a "Push": Standard Stein Variational Inference often fails to discover all modes or assigns them incorrect weights. The authors' clustering and mass refinement steps are essential for making SVI practical for geometric vision.
  • Efficiency via Approximation: By treating the covariance as pose-independent during early iterations (similar to iteratively reweighted least squares), SteinPnP achieves a massive speedup over MCMC without losing accuracy.
Fig. 2: Marginal roll KDE posterior for a planar PnP instance.

Key Results

  • Distribution Fidelity: On planar synthetic data, SteinPnP’s MMD² (a metric for distribution similarity) was orders of magnitude better than Gaussian baselines, closely matching the "ground truth" provided by slow MCMC methods.
  • Speed: SteinPnP is roughly 10x to 30x faster than MCMC samplers like Dynesty, bringing non-parametric uncertainty quantification much closer to real-time feasibility (around 1-2 seconds per estimate vs. 30-60 seconds).
  • Accuracy: Despite focusing on uncertainty, SteinPnP maintains competitive point-estimate accuracy, matching or exceeding state-of-the-art solvers in both rotation and translation error.
Fig. 3: Euler angle marginals (left) and roll–yaw scatter plots (right) comparing SteinPnP against the Dynesty (reference) for coplanar (top) and non-planar (bottom) scenarios. SteinPnP accordingly captures both the bimodal and unimodal posterior.

Limitations and Future Work

While much faster than MCMC, SteinPnP is still significantly slower than simple Gaussian solvers (which run in milliseconds). The current implementation takes about 1-2 seconds, which might be too slow for high-frequency control loops but is suitable for global localization or slower mapping tasks.

The authors suggest that future work could involve exploring parametric models (like Mixture of Gaussians) that might offer a middle ground between the flexibility of particles and the speed of simple distributions. They also aim to further optimize the code for better run-time efficiency.

Summary updated

Abstract

We propose SteinPnP, a probabilistic Perspective- N-Point (PnP) solver that models the full 6-DoF camera pose posterior using a non-parametric set of pose particles. By lever- aging Stein Variational Inference (SVI), SteinPnP combines the expressivity of particle-based representations with the efficiency of optimization-based solvers. However, a naive application of SVI struggles in the PnP problem, often missing alternative pose hypotheses or assigning incorrect probability weights to them. To address these limitations, we propose practical remedies that discover new potential poses, identify distinct hypothesis clusters, and balance their relative probability weights to capture the true underlying distribution. Our experiments across synthetic and real-world benchmarks demonstrate that SteinPnP accurately captures complex multimodal uncertainties while maintaining competitive accuracy.
BibTeX
@misc{lardinoit2026steinpnp,
  author = {Baptiste Lardinoit and Jongseok Lee and Andres Yubero and Seong Hun Lee and Javier Civera and Rudolph Triebel},
  title = {{SteinPnP: Non-Parametric Uncertainty Quantification in the Perspective-N-Point Problem}},
  year = {2026},
  eprint = {2611.15437},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.15437},
}
Figure