Benchmarking Image Retrieval for Visual Localization

Noé Pion, Martin Humenberger, Gabriela Csurka, Yohann Cabon, Torsten Sattler · DOI

Abstract

Visual localization—the process of estimating a camera's pose within a known scene—is a foundational technology for autonomous driving and augmented reality. Modern localization pipelines frequently employ image retrieval to either provide a coarse pose estimate or to identify relevant sub-regions of a large-scale scene. While it is standard practice to use state-of-the-art retrieval algorithms for these tasks, these models are typically optimized for landmark recognition, where viewpoint invariance is a primary goal. However, robustness to viewpoint changes is not always beneficial for geometric localization. This paper introduces a comprehensive benchmark to evaluate the role of image retrieval across multiple localization tasks. Our findings reveal that performance on traditional landmark retrieval tasks does not always correlate with localization accuracy, highlighting a critical need for retrieval methods specifically engineered for geometric constraints.

Introduction

In the field of computer vision, image retrieval is often treated as a "solved" front-end component for localization. The logic is straightforward: to find out where you are, find images in a database that look like your current view and use their metadata to derive a position. However, most off-the-shelf retrieval models are trained for landmark recognition (e.g., identifying the Eiffel Tower from any distance or angle).

This paper argues that this "viewpoint invariance" can be a double-edged sword. While helpful for identifying a building, it can be detrimental when the goal is to pinpoint exact coordinates. By benchmarking three distinct localization tasks, we demonstrate a significant disconnect between standard retrieval metrics and actual navigation performance.

The Three Tasks of Localization

To understand how retrieval impacts performance, the researchers established a benchmark focusing on three specific use cases:

  1. Task 1: Pose Approximation: The system estimates the query pose by interpolating the known poses of the top-$k$ retrieved images. This is the most direct use of retrieval for positioning.
  2. Task 2a: Accurate Pose without a Global Map: The system builds a local 3D model "on-the-fly" using the retrieved images (Local Structure-from-Motion) and matches the query image to this temporary model.
  3. Task 2b: Accurate Pose with a Global Map: Retrieval is used to narrow down the search space within a massive, pre-existing 3D map, allowing for fine-grained feature matching.

Experimental Methodology

The study compared "classic" handcrafted descriptors, such as DenseVLAD, against modern deep-learning architectures, including NetVLAD, AP-GeM, and DELG. To ensure a fair comparison, the researchers kept the rest of the localization pipeline—such as local features (R2D2) and geometric solvers (COLMAP)—constant.

The evaluation spanned three diverse environments:

  • Aachen Day-Night-v1.1: Handheld outdoor images featuring extreme day-to-night transitions.
  • RobotCar Seasons: Autonomous driving data with consistent viewpoints but varying weather and seasonal conditions.
  • Baidu Mall: A challenging indoor environment with repetitive structures and dynamic occlusions.

Key Insights and the "Robustness Paradox"

The Metric Mismatch

A central finding of the study is that standard retrieval metrics, such as Recall@k, are poor predictors of success for Pose Approximation (Task 1) and Local SfM (Task 2a). While Recall@k correlates well with Task 2b (Global Maps), a model that tops a retrieval leaderboard might fail in a real-world navigation scenario because it lacks the necessary geometric sensitivity.

The Robustness Paradox

For Task 1, being too robust to viewpoint changes is actually a disadvantage. If a model matches a query to a database image taken 20 meters away because they share a landmark, the resulting interpolated pose will be highly inaccurate. In these instances, older, more "brittle" methods like DenseVLAD occasionally outperformed sophisticated deep models because they only matched images with very similar viewpoints.

Diversity vs. Similarity

In Task 2a (Local SfM), the goal is not just to find the most similar images, but a diverse set of images. To triangulate a 3D point accurately, you need views of the same scene from different angles. If a retrieval model returns five images taken from the exact same spot, the mathematical triangulation fails, regardless of how "accurate" the retrieval was.

Results Summary

  • Global Map Success: Modern deep models like AP-GeM and DELG dominate Task 2b. Their ability to handle lighting changes (especially at night) makes them excellent for narrowing down a global search area.
  • Interpolation Simplicity: For Task 1, simple Cosine Similarity (CSI) weighting for pose interpolation generally outperformed more complex methods. In autonomous driving scenarios (RobotCar), simply adopting the pose of the single best-matched image was often more accurate than trying to interpolate between multiple results.
  • The SfM Gap: There was almost no correlation between retrieval precision and final pose accuracy in Task 2a, as standard models do not account for the geometric requirements of 3D reconstruction.

Conclusion

The current generation of image retrieval models is "pose-agnostic," which limits their utility in precision navigation. The authors conclude that the next frontier in the field is localization-specific retrieval training. Rather than optimizing for visual similarity alone, future models should be trained with loss functions that prioritize geometric consistency and pose accuracy. Moving toward "active retrieval"—where a system specifically seeks out images that provide the best geometric constraints—could bridge the gap between seeing a landmark and knowing exactly where you stand.

Summary updated

BibTeX
@inproceedings{pion2020benchmarking,
  author = {Noé Pion and Martin Humenberger and Gabriela Csurka and Yohann Cabon and Torsten Sattler},
  title = {{Benchmarking Image Retrieval for Visual Localization}},
  booktitle = {3DV},
  year = {2020},
  doi = {10.1109/3dv50981.2020.00058},
}
Figure