MegaLoc: One Retrieval to Place Them All

Gabriele Berton, Carlo Masone
2/24/2025
cs.CV

Official code: gmberton/MegaLoc (312 stars, MIT, last commit 2026-03-30).

Abstract

Retrieving images from the same location as a given query is an important component of multiple computer vision tasks, like Visual Place Recognition, Landmark Retrieval, Visual Localization, 3D reconstruction, and SLAM. However, existing solutions are built to specifically work for one of these tasks, and are known to fail when the requirements slightly change or when they meet out-of-distribution data. In this paper we combine a variety of existing methods, training techniques, and datasets to train a retrieval model, called MegaLoc, that is performant on multiple tasks. We find that MegaLoc (1) achieves state of the art on a large number of Visual Place Recognition datasets, (2) impressive results on common Landmark Retrieval datasets, and (3) sets a new state of the art for Visual Localization on the LaMAR datasets, where we only changed the retrieval method to the existing localization pipeline. The code for MegaLoc is available at https://github.com/gmberton/MegaLoc

View on arXivView PDF

Code Implementations(1)

gmberton/MegaLocOfficial100%
MIT

An image retrieval model for any localization task

31210PythonFeb 17, 20256 months agoMIT
geolocalizationimage-retrievallocalizationplace-recognitionvisual-geolocalization+2 more

Similar Papers

Cite this paper

@article{berton2025megaloc,
  title  = {MegaLoc: One Retrieval to Place Them All},
  author = {Gabriele Berton and Carlo Masone},
  year   = {2025},
  eprint = {2502.17237},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.17237v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.17237.svg)](https://codeofpaper.com/paper/2502.17237)

Discussion