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)
python >= 3.7
pytorch >= 1.8
tensorboarx >= 2.5
pyyaml >= 6.0
We use extra human parsing result generated by SCHP.
- Install SCHP and download LIP pretrained model(exp-schp-201908261155-lip.pth).
- Replace "simple_extractor.py" in SCHP with the same name file in our repo.
- 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 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
Download the trained models in following link: LTCC,Market-1501,MSMT17.
# test on LTCC
python main.py --cfg ./config/TCIP-ltcc-test.yaml
@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}
}
Our experiment framework code follows https://github.com/oliverck/person_reid_develop.
And we cite TransReID by following https://github.com/damo-cv/TransReID.