Visible Structure Retrieval for Lightweight Image-Based Relocalisation

Fereidoon Zangeneh, Leonard Bruns, Amit Dekel, Alessandro Pieropan, Patric JensfeltarXiv 2025 · DOI

Abstract

Camera relocalisation is a critical task for autonomous systems, traditionally relying on large-scale image databases for structure-based matching. However, these databases scale poorly with environment size. We present Visible Structure Retrieval (ViStR), a novel approach that replaces extensive image retrieval databases with a compact, scene-specific neural network. By learning to generate the 3D structure visible from a query image, ViStR achieves state-of-the-art accuracy while being up to 50x faster and significantly more memory-efficient than traditional hierarchical localization pipelines.

Introduction

Determining a camera's precise position and orientation within a known environment—camera relocalisation—is fundamental to autonomous driving and augmented reality. Structure-based methods, which match 2D pixels to 3D map points, offer high accuracy but face scalability challenges. In large-scale environments, finding the correct 3D points becomes a "needle in a haystack" problem.

Existing solutions typically use image retrieval to narrow the search space by finding similar images in a database. However, as the mapped area grows, these databases increase in size ($O(n)$ complexity), leading to significant storage and computational overhead. ViStR addresses this by shifting from a discriminative retrieval paradigm to a generative one.

Methodology: Visible Structure Retrieval

Instead of searching through a database of images, ViStR utilizes a compact Conditional Variational Autoencoder (CVAE) to model the relationship between global image features and the visible 3D structure.

The CVAE Framework

The core of the system is a small multilayer perceptron (MLP) acting as a decoder. During the mapping phase, the network is trained to reconstruct the 3D coordinates of points visible in training images, conditioned on global features extracted via DINOv2.

The ViStR CVAE architecture, showing (a) the training process with reconstruction loss and KL divergence, and (b) the inference process where the decoder generates predicted 3D points from image features and noise.

At inference time, the network "imagines" the set of 3D points that should be visible from the perspective of a query image. This generative approach allows for constant-time ($O(1)$) retrieval, as the scene representation is stored within the fixed-size weights of the neural network rather than an ever-growing image database.

The Relocalisation Pipeline

The predicted 3D points generated by the CVAE serve as a filtered subset of the global map. To refine these predictions, a quick radius search is performed in a k-d tree containing the actual map points. This step bridges the gap between the network's continuous predictions and the discrete geometric map.

The complete relocalisation pipeline: query image features are processed by the ViStR decoder to generate visible structure, which is then matched against the map via a K-D tree and SuperPoint features for a final PnP RANSAC pose estimation.

The final pose estimation is performed using traditional geometric methods. Local features (extracted with SuperPoint) are matched against the retrieved 3D points, and the camera pose is calculated via PnP RANSAC. This hybrid approach combines the memory efficiency of regression-based methods with the geometric precision of structure-based localization.

Experimental Results

ViStR was evaluated on the Cambridge Landmarks and Aachen-Day-Night benchmarks.

  • Efficiency: On the Aachen dataset, ViStR achieved an average localization time of 89ms, making it approximately 50 times faster than the standard HLoc pipeline (5318ms).
  • Storage: The retrieval component requires only 7MB, a fraction of the storage needed for traditional image retrieval (56MB) or complex hierarchical baselines (up to 658MB).
  • Accuracy: Despite its lightweight nature, ViStR maintains accuracy comparable to state-of-the-art hierarchical methods and significantly outperforms previous implicit localization methods like MS-Transformer on large-scale scenes.

Discussion and Future Work

ViStR demonstrates that generative retrieval can effectively replace massive databases for camera relocalisation. By representing a scene through network weights, it achieves constant-time scaling and high memory efficiency.

A current limitation is the continued reliance on 3D point descriptors for the final matching stage, which still consume significant memory. Future research aims to develop geometry-only matching techniques. By matching 2D keypoints to 3D structures based solely on spatial arrangement, the need for descriptors could be eliminated, leading to an ultra-lightweight, fully descriptor-free localization pipeline.

Summary updated

BibTeX
@misc{zangeneh2025visible,
  author = {Fereidoon Zangeneh and Leonard Bruns and Amit Dekel and Alessandro Pieropan and Patric Jensfelt},
  title = {{Visible Structure Retrieval for Lightweight Image-Based Relocalisation}},
  year = {2025},
  eprint = {2511.12503},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.12503},
}
Figure