PASS: Part-Aware Self-Supervised Pre-Training for Person Re-Identification [pdf]
The official repository for PASS: Part-Aware Self-Supervised Pre-Training for Person Re-Identification ECCV2022.
pip install -r requirements.txt
We recommend to use /torch=1.8.0 /torchvision=0.9.0 /timm=0.3.4 /cuda>11.1 /faiss-gpu=1.7.2/ A100 for training and evaluation. If you find some packages are missing, please install them manually. You can refer to DINO, TransReID and cluster-contrast-reid to install the environment of pre-training, supervised ReID and unsupervised ReID, respectively. You can also refer to TransReID-SSL to install the whole environments.
mkdir data
Download the datasets:
- Market-1501
- MSMT17
- LUPerson. We don't have the copyright of the LUPerson dataset. Please contact authors of LUPerson to get this dataset.
Then unzip them and rename them under the directory like
data
├── market1501
│ └── bounding_box_train
│ └── bounding_box_test
│ └── ..
├── MSMT17
│ └── train
│ └── test
│ └── ..
└── LUP
└── images
Model | Download |
---|---|
ViT-S/16 | link |
ViT-B/16 | link |
Please download pre-trained models and put them into your custom file path.
We have reproduced the performance to verify the reproducibility. The reproduced results may have a gap of about 0.1~0.2% with the numbers in the paper.
Model | Image Size | mAP | Rank-1 | Download |
---|---|---|---|---|
ViT-S/16 | 256*128 | 92.2 | 96.3 | model / log |
ViT-S/16 | 384*128 | 92.6 | 96.8 | model / log |
ViT-B/16 | 256*128 | 93.0 | 96.8 | model / log |
ViT-B/16 | 384*128 | 93.3 | 96.9 | model / log |
Model | Image Size | mAP | Rank-1 | Download |
---|---|---|---|---|
ViT-S/16 | 256*128 | 69.1 | 86.5 | model / log |
ViT-S/16 | 384*128 | 71.7 | 87.9 | model / log |
ViT-B/16 | 256*128 | 71.8 | 88.2 | model / log |
ViT-B/16 | 384*128 | 74.3 | 89.7 | model / log |
Model | Image Size | mAP | Rank-1 | Download |
---|---|---|---|---|
ViT-S/16 | 256*128 | 90.2 | 95.8 | model / log |
Model | Image Size | mAP | Rank-1 | Download |
---|---|---|---|---|
ViT-S/16 | 256*128 | 49.1 | 72.7 | model / log |
Model | Image Size | mAP | Rank-1 | Download |
---|---|---|---|---|
ViT-S/16 | 256*128 | 88.7 | 95.0 | model / log |
Model | Image Size | mAP | Rank-1 | Download |
---|---|---|---|---|
ViT-S/16 | 256*128 | 41.0 | 67.0 | model / log |
Our implementation is mainly based on the following codebases. We gratefully thank the authors for their wonderful works.
TransReID-SSL, LUPerson, DINO, TransReID, cluster-contrast-reid.
If you find this code useful for your research, please cite our paper
@article{zhu2022part,
title={PASS: Part-Aware Self-Supervised Pre-Training for Person Re-Identification},
author={Zhu, Kuan and Guo, Haiyun and Yan, Tianyi and Zhu, Yousong and Wang, Jinqiao and Tang, Ming},
journal={arXiv preprint arXiv:2203.03931},
year={2022}
}
If you have any question, please feel free to contact us. E-mail: [email protected]. 环境配置 如果发生 No module named 'torch._six' 进行如下替换
#from torch._six import container_abcs TORCH_MAJOR = int(torch.version.split('.')[0]) TORCH_MINOR = int(torch.version.split('.')[1]) if TORCH_MAJOR == 1 and TORCH_MINOR < 8: from torch._six import container_abcs else: import collections.abc as container_abcs
环境 1.conda建立一个 3.10的python虚拟环境 2.pip3 install torch torchvision torchaudio 3.pip install -r requ.txt