Pytorch code for paper "Local-Aware Transformers with Attention Residual Connections for Visible-Infrared Person Re-Identification"
We adopt the Transformer as backbone respectively.
Datasets | Backbone | Rank@1 | Rank@10 | Rank@20 | mAP | mINP | Model | - |
---|---|---|---|---|---|---|---|---|
#SYSU-MM01 | Transformer | 76.71% | 97.33% | 99.05% | 72.95% | 60.18% | GoogleDrive | Baidu Netdisk |
*The results may exhibit fluctuations due to random splitting, and further improvement can be achieved by fine-tuning the hyperparameters.
-
RegDB [1]: The RegDB dataset can be downloaded from this website.
-
SYSU-MM01 [2]: The SYSU-MM01 dataset can be downloaded from this website.
-
run
python pre_process_sysu.py
to pepare the dataset, the training data will be stored in ".npy" format.python pre_process_sysu.py
-
-
LLCM [5]: The LLCM dataset can be downloaded by sending a signed dataset release agreement copy to zhangyk@stu.xmu.edu.cn.
Train LAReViT by
python train.py --dataset sysu --gpu 0
-
--dataset
: which dataset "sysu", "regdb" or "llcm". -
--gpu
: which gpu to run.
You may need manually define the data path first.
Test a model on SYSU-MM01 dataset by
python test.py --dataset 'sysu' --mode 'all' --resume 'model_path' --gpu 0
--dataset
: which dataset "sysu".--mode
: "all" or "indoor" (only for sysu dataset).--resume
: the saved model path.--gpu
: which gpu to use.
Test a model on RegDB dataset by
python test.py --dataset 'regdb' --resume 'model_path' --tvsearch True --gpu 0
--tvsearch
: whether thermal to visible search True or False (only for regdb dataset).
Test a model on LLCM dataset by
python test.py --dataset 'llcm' --resume 'model_path' --gpu 0
[1] Lu H, Zou X, Zhang P. Learning progressive modality-shared transformers for effective visible-infrared person re-identification[C]//Proceedings of the AAAI conference on Artificial Intelligence. 2023, 37(2): 1835-1843.
[2] He S, Luo H, Wang P, et al. Transreid: Transformer-based object re-identification[C]//Proceedings of the IEEE/CVF international conference on computer vision. 2021: 15013-15022.
[3] Diko A, Avola D, Cascio M, et al. ReViT: Enhancing Vision Transformers with Attention Residual Connections for Visual Recognition[J]. arXiv preprint arXiv:2402.11301, 2024.
[4] Ni H, Li Y, Gao L, et al. Part-aware transformer for generalizable person re-identification[C]//Proceedings of the IEEE/CVF International Conference on Computer Vision. 2023: 11280-11289.