The official repository for Dynamic Prototype Mask for Occluded Person Re-Identification [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 and it takes around 14GB GPU memory.
You can train the DPM with:
python train.py --config_file configs/dpm.yml MODEL.DEVICE_ID "('your device id')"Some examples:
# Occluded_Duke
python train.py --config_file configs/OCC_Duke/dpm.yml MODEL.DEVICE_ID "('0')"-
We have set the validation set as Occluded REID when training on the Market-1501. Therefore, if you want to use the Market-1501, please modify it in the 'datasets/market1501.py'.
-
Before training on the Occluded REID, please put the Rename.py under the dataset dir to rename the dataset.
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_dpm/transformer_150.pth'| Dataset | Rank@1 | mAP | Model |
|---|---|---|---|
| Occluded-Duke | 71.4 (72.0) | 61.8 (61.9) | model |
| Occluded-REID | 85.5 (86.2) | 79.7 (80.0) | model |
We reorganize code and the performances are slightly higher than the paper's.
Please kindly cite this paper in your publications if it helps your research:
@inproceedings{tan2022dynamic,
title={Dynamic prototype mask for occluded person re-identification},
author={Tan, Lei and Dai, Pingyang and Ji, Rongrong and Wu, Yongjian},
booktitle={Proceedings of the 30th ACM international conference on multimedia},
pages={531--540},
year={2022}
}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 questions, please feel free to contact us. E-mail: tanlei@stu.xmu.edu.cn