Abstract
Recent studies show that vision models pre-trained in generic visual learning tasks with large-scale data can provide useful feature representations for a wide range of visual perception problems. However, few attempts have been made to exploit pre-trained foundation models in visual place recognition (VPR). Due to the inherent difference in training objectives and data between the tasks of model pre-training and VPR, how to bridge the gap and fully unleash the capability of pre-trained models for VPR is still a key issue to address. To this end, we propose a novel method to realize seamless adaptation of pre-trained models for VPR. Specifically, to obtain both global and local features that focus on salient landmarks for discriminating places, we design a hybrid adaptation method to achieve both global and local adaptation efficiently, in which only lightweight adapters are tuned without adjusting the pre-trained model. Besides, to guide effective adaptation, we propose a mutual nearest neighbor local feature loss, which ensures proper dense local features are produced for local matching and avoids time-consuming spatial verification in re-ranking. Experimental results show that our method outperforms the state-of-the-art methods with less training data and training time, and uses about only 3% retrieval runtime of the two-stage VPR methods with RANSAC-based spatial verification. It ranks 1st on the MSLS challenge leaderboard (at the time of submission). The code is released at https://github.com/Lu-Feng/SelaVPR.
Introduction
Visual Place Recognition (VPR) is the critical task of identifying the geographic location of a query image by matching it against a massive database of geo-tagged images. This problem is particularly challenging due to drastic changes in appearance caused by seasons, lighting, and viewpoints. While large-scale "foundation" models like DINOv2 offer robust general visual representations, they suffer from a Domain Gap in VPR: they often attend to dynamic objects like pedestrians or cars rather than static, reliable landmarks. Furthermore, traditional high-accuracy VPR methods suffer from an Efficiency Gap, relying on slow geometric verification (RANSAC) that hinders real-time application.
This paper introduces SelaVPR (Seamless Adaptation for Visual Place Recognition), a method that efficiently repurposes foundation models using lightweight, tunable adapters to achieve state-of-the-art accuracy with unprecedented speed.
Methodology
SelaVPR utilizes a hybrid adaptation strategy that keeps the massive pre-trained backbone frozen, tuning only a small fraction of parameters (~53M out of 304M+).
Global and Local Adaptation
As shown in the architecture above, Global Adaptation is achieved by inserting bottleneck adapters into each transformer block of a Vision Transformer (ViT). A serial adapter follows the Multi-Head Attention (MHA) layer, while a parallel adapter runs alongside the MLP layer. This configuration "steers" the model to prioritize static landmarks. For Local Adaptation, an up-sampling module consisting of two up-convolutional layers is added after the backbone to generate the dense local features necessary for fine-grained matching.
Mutual Nearest Neighbor Loss
A key innovation is the Mutual Nearest Neighbor Loss. This function optimizes local features to be so distinctive that the system can re-rank images by simply counting raw matches. This eliminates the need for computationally expensive RANSAC-based spatial verification, which is the primary bottleneck in traditional two-stage VPR pipelines.
Experimental Results
SelaVPR was evaluated on major benchmarks including MSLS (Mapillary Street-Level Sequences), Tokyo24/7, and Pitts30k.
- State-of-the-Art Accuracy: SelaVPR ranked 1st on the MSLS challenge leaderboard. On the challenging Tokyo24/7 dataset, it achieved a 94.0% Recall@1, significantly outperforming previous leaders like R²Former (88.6%).
- Efficiency Gains: The method is remarkably data-efficient, achieving these results with only 1/10th of the training data typically required. More importantly, it offers a 30x to 100x speedup in the re-ranking phase, processing queries in 0.112 seconds compared to the 3-11 seconds required by traditional two-stage methods.
Discussion and Visual Analysis
The success of SelaVPR is largely attributed to its ability to refocus the attention of foundation models.
Visualizations demonstrate that while standard foundation models may be "distracted" by transient objects, SelaVPR successfully shifts focus to permanent structures like buildings and vegetation. By avoiding full fine-tuning, the method also prevents "catastrophic forgetting," maintaining the robust representational power of the original foundation model while specializing it for the VPR domain.
Conclusion
SelaVPR demonstrates that foundation models can be seamlessly and efficiently adapted for specialized tasks like Visual Place Recognition. By combining lightweight adapters with a novel mutual nearest neighbor loss, the method achieves a new state-of-the-art in both accuracy and retrieval speed, paving the way for real-time, large-scale geographic localization.
Summary updated