Skip to content
InSAI-LabPublic

About

Repository of WeiToP project.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WeiToP & WeiAD

Homepage arXiv

Faster or Stronger: Towards Flexible Visual Place Recognition via Weighted Aggregation and Token Pruning

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.

📋 TODO

  • 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.

📁 Dataset

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.

🚀 Train

Use Python 3.10 and install the dependencies:

python -m pip install -r requirements.txt

Start training on GSV-Cities:

python train.py \
    --data-root /path/to/gsv-cities \
    --output-dir runs/weitop \
    --device cuda:0

DINOv2 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.

🙏 Acknowledgements

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.

📖 Cite

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}
}

About

Repository of WeiToP project.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages