hit2sjtu / salad

Optimal Transport Aggregation for Visual Place Recognition

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Optimal Transport Aggregation for Visual Place Recognition

Code for visual place recognitions using DINOv2 SALAD.

Setup

Install required dependencies:

conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
pip install pytorch-lightning prettytable faiss-gpu pytorch-metric-learning torchmetrics pandas

Dataset

For training, download GSV-Cities dataset, for evaluation download the desired datasets (MSLS, NordLand, SPED, Pittsburgh)

Train

For training DINOv2 SALAD on GSV-Cities run:

python3 main.py

Evaluation

You can download a pretrained DINOv2 SALAD model from here. For evaluating run:

python3 eval.py --ckpt_path 'weights/dino_salad.ckpt' --image_size 322 322 --batch_size 256 --val_datasets MSLS

About

Optimal Transport Aggregation for Visual Place Recognition

License:GNU General Public License v3.0


Languages

Language:Python 100.0%