Home

Awesome

CCSC

Cross-Compatible Embedding and Semantic Consistent Feature Construction for Sketch Re-identification

Usage

Installation

pip install -r requirements.txt
we use /torch 1.7 /timm 0.3.2 for training and evaluation.

Prepare Datasets

Preparing the dataset(Sketch Re-ID dataset[2] (paper) and QMUL-Shoe-v2[3] (paper)). and QMUL-Chair-v2[3] (paper)).

Prepare Transformer Pre-trained Models

You need to download the ImageNet pretrained transformer model : pre-train

Train

# Sketch Re-ID dataset 
python train.py --config_file /configs/transformerPKU.yml 
# QMUL-Shoe-v2
python train.py --config_file /configs/transformer_ShoeV2.yml
# QMUL-Chair-v2
python train.py --config_file /configs/transformer_ChairV2.yml

Test

# Sketch Re-ID dataset 
python test.py --config_file /configs/transformerPKU.yml   TEST.WEIGHT 'PKU_logs/transformer_100.pth'
# QMUL-Shoe-v2
python test.py --config_file /configs/transformer_ShoeV2.yml  TEST.WEIGHT 'shoe_logs/transformer_100.pth'
# QMUL-Chair-v2
python test.py --config_file /configs/transformer_ChairV2.yml  TEST.WEIGHT 'chair_logs/transformer_100.pth'

Contact

If you have any question, please feel free to contact me. E-mail: wangyongzeng@stu.kust.edu.cn,shuangli936@gmail.com

Reference

[1]He S, Luo H, Wang P, et al. Transreid: Transformer-based object re-identification[C]//Proceedings of the IEEE/CVF international conference on computer vision. 2021: 15013-15022.
[2]Pang L, Wang Y, Song Y Z, et al. Cross-domain adversarial feature learning for sketch re-identification[C]//Proceedings of the 26th ACM international conference on Multimedia. 2018: 609-617.
[3]Yu Q, Song J, Song Y Z, et al. Fine-grained instance-level sketch-based image retrieval[J]. International Journal of Computer Vision, 2021, 129(2): 484-500.