On the Market-1501 dataset, we accelerate the re-ranking processing from 89.2s to 9.4ms with one K40m GPU, facilitating the real-time post-processing. Similarly, we observe that our method achieves comparable or even better retrieval results on the other four image retrieval benchmarks, i.e., VeRi-776, Oxford-5k, Paris-6k and University-1652, with limited time cost.
The code was mainly developed and tested with python 3.7, PyTorch 1.4.1, CUDA 10.2, and CentOS release 6.10.
The code has been included in /extension. To compile it:
cd extension
sh make.shThe demo script evaluate_rerank_gpu.py provides the gnn re-ranking method using the prepared feature.
python evaluate_rerank_gpu.py --data_path PATH_TO_DATA --k1 26 --k2 7@article{zhang2026understanding,
title={Understanding Image Retrieval Re-Ranking: A Graph Neural Network Perspective},
author={Zhang, Xuanmeng and Jiang, Minyue and Zheng, Zhedong and Tan, Xiao and Yang, Yi},
journal={ACM Transactions on Multimedia Computing, Communications and Applications},
volume={22},
number={5},
pages={1--19},
year={2026},
publisher={ACM New York, NY}
}