Official Pytorch Implementation of the paper "Coarse-to-Fine: Learning Compact Discriminative Representation for Single-Stage Image Retrieval"
accept to ICCV 2023
- NVIDIA GPU, Linux, Python3(tested on 3.6.8)
- Tested with CUDA 11.0 and PyTorch 1.7.0
pip install -r requirements.txt
Download Google Landmarks dataset into datasets/images
. Unzip the files and make the dataset structures as datasets/data/landmark/train_list.txt
.
Download ROxford5k and RParis6k into datasets/images
. Unzip the files and make the directory structures as follows.
datasets
└ images
└ roxford5k
└ gnd_roxford5k.pkl
└ jpg
└ rparis6k
└ gnd_rparis6k.pkl
└ jpg
You can download pretrained weights from pemetric and download our model weights from Google Drive
Set datapath, model, training parameters in configs/resnet50_cfcd_s1_8gpu.yaml and run
sh run_train.sh
- ROxf and RPar feature extraction, and run
sh evaler/run_extractor_roxford_rparis.sh
- 1M distractor feature extraction, and run
sh evaler/run_extractor_revisitop1m.sh
- Eval on ROxf, RPar and +1M, and run
sh evaler/run_evaluate.sh
Our pytorch implementation is derived from DOLG, Revisiting Oxford and Paris and FIRe. We thank for these great works and repos.
If the project helps your research, please consider citing our paper as follows.
@inproceedings{zhu2023coarse,
title={Coarse-to-Fine: Learning Compact Discriminative Representation for Single-Stage Image Retrieval},
author={Zhu, Yunquan and Gao, Xinkai and Ke, Bo and Qiao, Ruizhi and Sun, Xing},
booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},
pages={11260--11269},
year={2023}
}