WeiAD (Weighted Aggregated Descriptor) produces global place descriptors through importance-weighted optimal transport aggregation. WeiToP distils aggregation-induced token importance into a lightweight predictor, enabling early token pruning during inference. Both components are trained jointly, allowing the token retention ratio to be adjusted at inference time to balance recognition accuracy and computational cost without retraining.
- Release WeiAD and WeiToP models.
- Release training code and the GSV-Cities dataloader.
- Release evaluation code and benchmark dataloaders.
- Add detailed training and evaluation instructions.
- Release pretrained checkpoints.
We train on GSV-Cities. Follow the dataset repository's download instructions and extract the images and metadata into the following structure:
gsv-cities/
├── Dataframes/
│ ├── Bangkok.csv
│ ├── Boston.csv
│ └── ...
└── Images/
├── Bangkok/
│ └── *.jpg
├── Boston/
│ └── *.jpg
└── ...
Keep the city names and image filenames unchanged. Pass the directory containing Dataframes/ and Images/ to --data-root. The dataloader samples four images per place from the 23 training cities.
Use Python 3.10 and install the dependencies:
python -m pip install -r requirements.txtStart training on GSV-Cities:
python train.py \
--data-root /path/to/gsv-cities \
--output-dir runs/weitop \
--device cuda:0DINOv2 pretrained weights are loaded through PyTorch Hub. Training runs for four epochs by default, with 60 places and four images per place in each batch. Adjust --batch-size and --num-workers for your hardware. Training checkpoints and logs are saved under --output-dir.
Our implementation builds on SALAD, DINOv2, GSV-Cities and SuperGlue. We thank their authors for making their code and datasets available. We also use PyTorch Lightning and PyTorch Metric Learning.
If you find this work useful, please cite:
@misc{zeng2026weitop,
title={Faster or Stronger: Towards Flexible Visual Place Recognition via Weighted Aggregation and Token Pruning},
author={Zichao Zeng and June Moh Goo and Junwei Zheng and Weijia Fan and Jiaming Zhang and Rainer Stiefelhagen and Jan Boehm},
year={2026},
eprint={2605.20551},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2605.20551}
}