- Python 3
- Pytorch (We run the code under version 0.3.1, maybe lower versions also work.)
pip install scipy, pillow, torchvision, sklearn, h5py, dominate, visdom
- Create directories for datasets:
mkdir datasets
cd datasets/
- Download datasets through the links below, and
unzip
.
Market1501:[Baidu Pan]link
- Create directories for datasets:
mkdir bestmodel
cd bestmodel
- Download trained model through the links below. it include encoder pre-model and the whole model.
encoder pre-trained model:[Baidu Pan]link
GAN model:[Baidu Pan]link
defalut: +reranking, if you want to remove re_ranking, you need to modify ./reid/evaluators.py
sh train.sh
If you use this method or this code in your research, please cite as:
@article{zhang2020pgan,
title={PGAN: Part-based nondirect coupling embedded GAN for person reidentification},
author={Zhang, Yue and Jin, Yi and Chen, Jianqiang and Kan, Shichao and Cen, Yigang and Cao, Qi},
journal={IEEE MultiMedia},
volume={27},
number={3},
pages={23--33},
year={2020},
publisher={IEEE}
}
Our code is inspired by [FDGAN] (https://github.com/yxgeee/FD-GAN), [PCB] (https://github.com/syfafterzy/PCB_RPP_for_reIDand) and open-reid.