Learning From Self-Discrepancy via Multiple Co-Teaching for Cross-Domain Person Re-Identification (MCN-MT)
This is the official implementation of our paper Learning from Self-Discrepancy via Multiple Co-teaching for Cross-Domain Person Re-Identification. This code is based on the Open-ReID library.
- Support Market1501, DukeMTMC-reID and CUHK03 datasets.
- The current version supports training on multi-GPUs.
Write the documents.
- Python3
- Numpy==1.16.4
- Matplotlib==3.1.1
- Torch==1.3.1
- Metric_learn==0.4.0
- tqdm==4.32.2
- torchvision==0.2.0
- scipy==1.1.0
- h5py==2.9.0
- Pillow==6.2.1
- six==1.13.0
- scikit_learn==0.21.3
This repo. supports training on multiple GPUs and the default setting is also multi-GPU.
-
Download all necessry datasets, e.g. DukeMTMC-reID, Market-1501 and CUHK03 datasets and move them to 'data'.
-
Before performing training from scratch, please download all models (Baidu NetDisk, Password: 102s) pretrained on DukeMTMC-reID and Market-1501, and then move them in the 'MCN_pretrain'
-
If you want to restart the train process using MCN with 3 models when trained on DukeMTMC-reID, while tested on Market-1501, the command you can type as
CUDA_VISIBLE_DEVICES=0,1,2,3 python selftrainingACT_3model.py --src_dataset dukemtmc --tgt_dataset market1501 --resume ./MCN_pretrain/Duke/Duke2Market.pth --data_dir ./data --logs_dir ./logs/dukemar_3model
If you want to restart the train process using MCN-MT (with meannet) with 3 models when trained on DukeMTMC-reID, while tested on Market-1501, the command you can type as
CUDA_VISIBLE_DEVICES=0,1,2,3 python selftrainingACT_3model_meannet.py --src_dataset dukemtmc --tgt_dataset market1501 --resume ./MCN_pretrain/Duke/Duke2Market.pth --data_dir ./data --logs_dir ./logs/dukemar_3model_meannet
If you want to train your own's pretrained model, please train source and adapted model by using code in Adaptive-ReID and follow Step#2.
Source --> Target | MCN | MCN-MT | Settings | ||
---|---|---|---|---|---|
Rank-1 | mAP | Rank-1 | mAP | ||
Duke --> Market | 82.6 | 63.2 | 84.3 | 64.9 | 4GPUs |
Market --> Duke | 72.5 | 53.5 | 74.7 | 57.8 | 4GPUs |
CUHK03 --> Market | 82.2 | 66.1 | 84.8 | 68.7 | 4GPUs |
CUHK03 --> Duke | 53.3 | 37.2 | 56.3 | 40.2 | 4GPUs |
This work was supported by the National Natural Science Foundation of China under Project(Grant No. 61977045). If you have further questions and suggestions, please feel free to contact us ([email protected]).
If you find this code useful in your research, please consider citing:
@article{xiang2022learning,
title={Learning from self-discrepancy via multiple co-teaching for cross-domain person re-identification},
author={Xiang, Suncheng and Fu, Yuzhuo and Guan, Mengyuan and Liu, Ting},
journal={Machine Learning},
pages={1--18},
year={2022},
publisher={Springer}
}