Skip to content

stone96123/SPT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[AAAI 2024] Occluded Person Re-identification via Saliency-Guided Patch Transfer

The official repository for Occluded Person Re-identification via Saliency-Guided Patch Transfer [pdf]

Prepare Datasets

mkdir data

Download 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 ..

Installation

pip install -r requirements.txt

Prepare ViT Pre-trained Models

You need to download the ImageNet pretrained transformer model : ViT-Base

Training

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')"

Evaluation

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'

Citation

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}
}

Acknowledgement

Our code is based on TransReID[1]

References

[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.

Contact

If you have any question, please feel free to contact us. E-mail: tanlei@stu.xmu.edu.cn

About

[AAAI2024] Occluded person re-identification via saliency-guided patch transfer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages