The official repository for Occluded Person Re-identification via Saliency-Guided Patch Transfer [pdf]
mkdir dataDownload the person datasets Market-1501, DukeMTMC-reID, Occluded-Duke, and the Occluded_REID, Then unzip them and rename them under the directory like
data
├── Occluded_Duke
│ └── images ..
├── Occluded_REID
│ └── images ..
├── market1501
│ └── images ..
└── dukemtmcreid
└── images ..
pip install -r requirements.txtYou need to download the ImageNet pretrained transformer model : ViT-Base
We utilize 1 3090 GPU for training.
You can train the SPT with:
First step:
Train the SPS model:
python train_pt.py --config_file configs/vit_base.yml MODEL.DEVICE_ID "('your device id')"Second step:
Train the ReID model:
python train_pt.py --config_file configs/vit_base.yml MODEL.DEVICE_ID "('your device id')" TEST.WEIGHT "('your path of trained SPS checkpoints')"Some examples:
# Occluded_Duke:
python train_pt.py --config_file configs/OCC_Duke/vit_base.yml MODEL.DEVICE_ID "('0')"
python train.py --config_file configs/OCC_Duke/vit_base.yml MODEL.DEVICE_ID "('0')" TEST.WEIGHT "('./logs/occ_duke_vit_base/sps.pth')"python test.py --config_file 'choose which config to test' MODEL.DEVICE_ID "('your device id')" TEST.WEIGHT "('your path of trained checkpoints')"Some examples:
# OCC_Duke
python test.py --config_file configs/OCC_Duke/dpm.yml MODEL.DEVICE_ID "('0')" TEST.WEIGHT './logs/occ_duke_vit_base/transformer_150.pth'Please kindly cite this paper in your publications if it helps your research:
@inproceedings{tan2024occluded,
title={Occluded person re-identification via saliency-guided patch transfer},
author={Tan, Lei and Xia, Jiaer and Liu, Wenfeng and Dai, Pingyang and Wu, Yongjian and Cao, Liujuan},
booktitle={Proceedings of the AAAI conference on artificial intelligence},
volume={38},
number={5},
pages={5070--5078},
year={2024}
}Our code is based on TransReID[1]
[1]Shuting He, Hao Luo, Pichao Wang, Fan Wang, Hao Li, and Wei Jiang. 2021. Transreid: Transformer-based object re-identification. In Proceedings of the IEEE/CVF International Conference on Computer Vision. 15013–15022.
If you have any question, please feel free to contact us. E-mail: tanlei@stu.xmu.edu.cn