Skip to content

stone96123/DPM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python >=3.6 PyTorch >=1.10

[ACMMM2022] Dynamic Prototype Mask for Occluded Person Re-Identification

The official repository for Dynamic Prototype Mask for Occluded Person Re-Identification [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 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')"
  1. 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'.

  2. Before training on the Occluded REID, please put the Rename.py under the dataset dir to rename the dataset.

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_dpm/transformer_150.pth'

Results

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.

Citation

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

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 questions, please feel free to contact us. E-mail: tanlei@stu.xmu.edu.cn

About

[ACMMM2022] Dynamic Prototype Mask for Occluded Person Re-Identification

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages