/TCiP

The official code of "A Transformer-based Cloth-irrelevant Patches Feature Extracting Method for Long-Term Cloth-Changing Person Re-identification"

Primary LanguagePython

TCiP

The official code of "A Transformer-based Cloth-irrelevant Patches Feature Extracting Method for Long-Term Cloth-Changing Person Re-identification" (Accepted by CGI 2022)

Pipeline

avatar

Requirements

Env

python >= 3.7
pytorch >= 1.8
tensorboarx >= 2.5
pyyaml >= 6.0

DATA PREPARE

We use extra human parsing result generated by SCHP.

  1. Install SCHP and download LIP pretrained model(exp-schp-201908261155-lip.pth).
  2. Replace "simple_extractor.py" in SCHP with the same name file in our repo.
  3. Extract human parsing results following:
python simple_extractor.py --model-restore ./exp-schp-201908261155-lip.pth --input-dir ../dataset/market1501/bounding_box_train --output-dir ../dataset/market1501/bounding_box_train-mask

python simple_extractor.py --model-restore ./exp-schp-201908261155-lip.pth --input-dir ../dataset/market1501/bounding_box_test --output-dir ../dataset/market1501/bounding_box_test-mask

python simple_extractor.py --model-restore ./exp-schp-201908261155-lip.pth --input-dir ../dataset/market1501/query --output-dir ../dataset/market1501/query-mask

python simple_extractor.py --model-restore ./exp-schp-201908261155-lip.pth --input-dir ../dataset/MSMT17/bounding_box_test --output-dir ../dataset/MSMT17/bounding_box_test-mask

python simple_extractor.py --model-restore ./exp-schp-201908261155-lip.pth --input-dir ../dataset/MSMT17/query --output-dir ../dataset/MSMT17/query-mask

python simple_extractor.py --model-restore ./exp-schp-201908261155-lip.pth --input-dir ../dataset/MSMT17/bounding_box_train --output-dir ../dataset/MSMT17/bounding_box_train-mask

TRAIN

#train on LTCC
python main.py --cfg ./config/TCIP-ltcc-train.yaml

#train on Market-1501
python main.py --cfg ./config/TCIP-market-train.yaml

#train on MSMT17
python main.py --cfg ./config/TCIP-msmt17-train.yaml

EVALUATION

Download the trained models in following link: LTCC,Market-1501,MSMT17.

# test on LTCC
python main.py --cfg ./config/TCIP-ltcc-test.yaml

Cite

@inproceedings{wang2023transformer,
  title={A Transformer-Based Cloth-Irrelevant Patches Feature Extracting Method for Long-Term Cloth-Changing Person Re-identification},
  author={Wang, Zepeng and Jiang, Xinghao and Xu, Ke and Sun, Tanfeng},
  booktitle={Advances in Computer Graphics: 39th Computer Graphics International Conference, CGI 2022, Virtual Event, September 12--16, 2022, Proceedings},
  pages={278--289},
  year={2023},
  organization={Springer}
}

Acknowledgement

Our experiment framework code follows https://github.com/oliverck/person_reid_develop.

And we cite TransReID by following https://github.com/damo-cv/TransReID.