Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gmberton/MegaLoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

32 Commits

Repository files navigation

MegaLoc

An image retrieval model for any localization task, which achieves SOTA on most VPR datasets, including indoor and outdoor ones.

Gradio Demo - ArXiv - Paper on ArXiv - Paper on HF - Model on HF.

Demo

Try the demo on your own images to see how good MegaLoc is! The demo uses a database of ~5M street-view images from San Francisco, and when you upload one it will find the most similar one from the same place.

image

Using the model

You can use the model with torch.hub, as simple as this

import torch
model = torch.hub.load("gmberton/MegaLoc", "get_trained_model")

For more complex uses, like computing results on VPR datasets, visualizing predictions and so on, you can use our VPR-methods-evaluation, which lets you do all this for MegaLoc and multiple other VPR methods on labelled or unlabelled datasets.

Qualitative examples

Here are some examples of top-1 retrieved images from the SF-XL test set, which has 2.8M images as database.

teaser

Acknowledgements / Cite / BibTex

If you use this repository please cite the following

@InProceedings{Berton_2025_CVPR,
 author = {Berton, Gabriele and Masone, Carlo},
 title = {MegaLoc: One Retrieval to Place Them All},
 booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops},
 month = {June},
 year = {2025},
 pages = {2861-2867}
}

AltStyle によって変換されたページ (->オリジナル) /