/Part-Aware-Transformer

[ICCV 2023] An official implementation for "Part-Aware Transformer for Generalizable Person Re-identification"

Primary LanguagePython

Part-Aware-Transformer

Official repo for "Part-Aware Transformer for Generalizable Person Re-identification" [ICCV 2023]

Here are some instructions to run our code. Our code is based on TransReID, thanks for their excellent work.

1. Clone this repo

git clone https://github.com/liyuke65535/Part-Aware-Transformer.git

2. Prepare your environment

conda create -n pat python==3.10
conda activate pat
bash enviroments.sh

3. Prepare pretrained model (ViT-B) and datasets

You can download it from huggingface, rwightman, or else where. For example, pretrained model is avaliable at ViT-B.

As for datasets, follow the instructions in MetaBIN.

4. Modify the config file

# modify the model path and dataset paths of the config file
vim ./config/PAT.yml

5. Train a model

bash run.sh

6. Evaluation only

# modify the trained path in config
vim ./config/PAT.yml

# evaluation
python test.py --config ./config/PAT.yml

Citation

If you find this repo useful for your research, you're welcome to cite our paper.

@inproceedings{ni2023part,
  title={Part-Aware Transformer for Generalizable Person Re-identification},
  author={Ni, Hao and Li, Yuke and Gao, Lianli and Shen, Heng Tao and Song, Jingkuan},
  booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},
  pages={11280--11289},
  year={2023}
}