Learning to Generalize Unseen Domains via Memory-based Multi-Source Meta-Learning for Person Re-Identification (CVPR 2021)
Introduction
This is the Pytorch implementation for M3L.
Requirements
-
CUDA>=10.0
-
At least three 2080-Ti GPUs
-
Other necessary packages listed in requirements.txt
-
Training Data
The model is trained and evaluated on Market-1501, DukeMTMC-reID, MSMT17_V1, MSMT17_V2, CUHK03 and CUHK-NP
Note:
For CUHK03 dataset, we use the old protocol (CUHK03) as the source domain for training the model and the detected subset of the new protocol (CUHK-NP) as the target domain for evaluation.
For MSMT17, we use the MSMT17_V2 for both training and testing.
We recommend using the detected subset of CUHK-NP and MSMT17_V1 for both training and testing and we will add the results with them at a later date.
Unzip all datasets and ensure the file structure is as follow:
data │ └─── market1501 / dukemtmc / cuhknp / cuhk03 / msmt17v1 / msmt17v2 │ └─── DukeMTMC-reID / Market-1501-v15.09.15 / detected / cuhk03_release / MSMT17_V1 / MSMT17_V2
Run
ARCH=resMeta/IBNMeta
SRC1/SRC2/SRC3=market1501/dukemtmc/cuhk03/msmt17v1/msmt17v2
TARGET=market1501/dukemtmc/cuhknp/msmt17v1/msmt17v2
# train
CUDA_VISIBLE_DEVICES=0,1,2 python main.py \
-a $ARCH --BNNeck \
--dataset_src1 $SRC1 --dataset_src2 $SRC2 --dataset_src3 $SRC3 -d $TARGET \
--logs-dir $LOG_DIR --data-dir $DATA_DIR
# evaluate
python main.py \
-a $ARCH -d $TARGET \
--logs-dir $LOG_DIR --data-dir $DATA_DIR \
--evaluate --resume $RESUME
Results
You can download the above models in the paper from Google Drive. The model is named as $TARGET_$ARCH.pth.tar
.
Acknowledgments
This repo borrows partially from MWNet, ECN and SpCL.
Citation
@inproceedings{zhao2021learning,
title={Learning to Generalize Unseen Domains via Memory-based Multi-Source Meta-Learning for Person Re-Identification},
author={Zhao, Yuyang and Zhong, Zhun and Yang, Fengxiang and Luo, Zhiming and Lin, Yaojin and Li, Shaozi and Nicu, Sebe},
booktitle={CVPR},
year={2021},
}
Contact
Email: [email protected]