Our work has been accepted by ICRA2024 :clap: 🎉
If you use our code in your work, please star our repo and cite our paper [pdf].
@inproceedings{shen2024icra,
title={{TSCM: A Teacher-Student Model for Vision Place Recognition Using Cross-Metric Knowledge Distillation}},
author={Shen, Yehui and Liu, Mingmin and Lu, Huimin and Chen, Xieyuanli},
booktitle={IEEE International Conference on Robotics and Automation (ICRA)},
year={2024}
}
You can download the pittsburgh dataset on https://www.dropbox.com/s/ynep8wzii1z0r6h/pittsburgh.zip?dl=0
If you want to verify the effect, you can download the stu_30k.pickle file and put it in the folder /logs/contrast/ ,run the following code
python vis.py
In training mode
self.parser.add_argument('---split', type=str, default='val', help='Split to use', choices=['val', 'test'])
# train the teacher net
python main.py --phase=train_tea
# train the student net supervised by the pretrained teacher net
python main.py --phase=train_stu --resume=[logs/teacher_net_xxx/ckpt_best.pth.tar]
In test mode
self.parser.add_argument('---split', type=str, default='val', help='Split to use', choices=['val', 'test'])
needs to be changed to
self.parser.add_argument('---split', type=str, default='test', help='Split to use', choices=['val', 'test'])
You can run pre-trained models. The teacher_triplet/ckpt.pth.tar in the code needs to be changed to the appropriate name.
If this pre-training model doesn't work or you need more pre-training models, please contact me in Issue.
python main.py --phase=test_stu --resume=logs/teacher_triplet/ckpt.pth.tar
if you want to use the model to place recognition, you can replace the code in find_pair.py with the code in trainer.py and run the following code.
python main.py --phase=test_stu --resume=logs/teacher_triplet/ckpt.pth.tar
Thanks to the open source work of baseline, the code of TSCM is based on it.