Map-Relative Pose Regression for Visual Re-Localization

Shuai Chen, Tommaso Cavallari, Victor Adrian Prisacariu, Eric Brachmann · DOI

Abstract

Pose regression networks predict the camera pose of a query image relative to a known environment. Within this family of methods, absolute pose regression (APR) has recently shown promising accuracy in the range of a few centimeters in position error. APR networks encode the scene geometry implicitly in their weights. To achieve high accuracy, they require vast amounts of training data that, realistically, can only be created using novel view synthesis in a days-long process. This process has to be repeated for each new scene again and again. We present a new approach to pose regression, map-relative pose regression (marepo), that satisfies the data hunger of the pose regression network in a scene-agnostic fashion. We condition the pose regressor on a scene-specific map representation such that its pose predictions are relative to the scene map. This allows us to train the pose regressor across hundreds of scenes to learn the generic relation between a scene-specific map representation and the camera pose. Our map-relative pose regressor can be applied to new map representations immediately or after mere minutes of fine-tuning for the highest accuracy. Our approach outperforms previous pose regression methods by far on two public datasets, indoor and outdoor. Code is available: https://nianticlabs.github.io/marepo

Introduction

Visual re-localization—determining the precise 6-DoF pose of a camera from a single image—is fundamental to robotics and augmented reality. Current approaches generally fall into two categories: structure-based methods (SCR) and absolute pose regression (APR). SCR methods predict 3D scene coordinates for pixels and use geometric solvers like RANSAC, offering high precision but at the cost of high computational overhead and non-deterministic behavior. Conversely, APR methods use neural networks to regress poses directly. While fast and simple, APR methods typically suffer from lower accuracy and extreme "data hunger," often requiring days of synthetic data generation to learn the implicit geometry of a single scene.

We introduce marepo (Map-Relative Pose Regression), a hybrid framework that bridges this gap. By regressing camera poses relative to a scene-specific map rather than in an absolute global coordinate system, marepo achieves state-of-the-art accuracy while reducing scene-specific training time from days to just five minutes.

Methodology

The core innovation of marepo is the decoupling of scene-specific geometry from the pose regression logic. The architecture consists of two primary components:

  1. Scene Geometry Prediction ($G_S$): A lightweight, scene-specific CNN (based on the ACE architecture) that maps image pixels to 3D scene coordinates. This component is trained for each new scene in approximately 5 minutes.
  2. Map-Relative Pose Regressor ($M$): A scene-agnostic Transformer that takes the predicted 3D coordinates and camera intrinsics to regress the final 6-DoF pose.
The marepo architecture: a scene-specific geometry network followed by a scene-agnostic pose regressor.

By training the Transformer on hundreds of diverse scenes, the model learns the general geometric relationship between 3D points and camera poses. This allows the heavy computational lifting to be performed once, enabling the system to generalize to new environments with minimal fine-tuning. Furthermore, a Dynamic Positional Encoding mechanism incorporates camera focal lengths and principal points, allowing the same pre-trained Transformer to function across different hardware configurations without retraining.

Experimental Results

The performance of marepo was evaluated on the 7-Scenes, 12-Scenes, and Wayspots datasets.

Accuracy and Efficiency

On the 7-Scenes indoor benchmark, marepo achieved a median translation error of 3.9 cm, a significant improvement over the 44 cm error of PoseNet. When fine-tuned for 15 minutes (marepo$_S$), the error dropped further to 3.2 cm.

Performance vs. Mapping Time on 7-Scenes. marepo achieves high accuracy with minimal training time.

Crucially, marepo maintains high inference speeds, running at 55.6 frames per second (fps). This makes it suitable for real-time mobile applications where both precision and low latency are required.

Outdoor Robustness

The model also demonstrated superior performance on the Wayspots outdoor dataset, which features challenging lighting and weather conditions. marepo outperformed all previous pose regression methods by a wide margin, proving its effectiveness in complex, real-world environments beyond controlled indoor settings.

Conclusion

marepo represents a significant step forward for visual re-localization by combining the strengths of geometric reasoning with the efficiency of pose regression. By utilizing a scene-agnostic regressor conditioned on scene-specific maps, it eliminates the prohibitive training times of traditional APR methods while rivaling the accuracy of structure-based solvers. Future work will focus on improving robustness to dynamic environmental changes and integrating temporal information for smoother pose estimation.

Summary updated

BibTeX
@inproceedings{chen2024map,
  author = {Shuai Chen and Tommaso Cavallari and Victor Adrian Prisacariu and Eric Brachmann},
  title = {{Map-Relative Pose Regression for Visual Re-Localization}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2024},
  doi = {10.1109/cvpr52733.2024.01953},
}
Figure