Implementation of paper "Unsupervised Lifelong Person Re-identification via Contrastive Rehearsal".
conda create -n env_ucr python=3.6
source activate env_ucr
pip install numpy torch==1.4.0 torchvision==0.5.0 h5py six Pillow scipy sklearn metric-learn tqdm faiss-gpu==1.6.3
python setup.py develop
cd examples && mkdir data
Download the raw datasets Market-1501, Cuhk-Sysu, MSMT17, VIPeR, PRID2011, GRID, iLIDS, CUHK01, CUHK02, SenseReID, CUHK03 and 3DPeS, and then unzip them under the directory like
UCR/examples/data
├── market1501
│ ├── bounding_box_train/
│ ├── bounding_box_test/
│ └── query/
├── cuhk-sysu
│ └── CUHK-SYSU
│ ├── Image/
│ └── annotation/
├── msmt17
│ └── MSMT17_V2
├── viper
│ └── VIPeR
├── prid2011
│ └── prid_2011
├── grid
│ └── underground_reid
├── ilids
│ └── i-LIDS_Pedestrian
├── cuhk01
│ └── campus
├── cuhk02
│ └── Dataset
├── sensereid
│ └── SenseReID
├── cuhk03
│ └── cuhk03_release
└── 3dpes
└── 3DPeS
Train UCR on default order (Market to Cuhk-Sysu to MSMT17). The results reported in the paper were obtained with 4 GPUs.
sh unsupervised_lifelong.sh
sh supervised_lifelong.sh
python examples/test.py --init examples/logs/step3.pth.tar
If you find this project useful, please kindly star our project and cite our paper.
@article{chen2022unsupervised,
title={Unsupervised Lifelong Person Re-identification via Contrastive Rehearsal},
author={Chen, Hao and Lagadec, Benoit and Bremond, Francois},
journal={arXiv preprint arXiv:2203.06468},
year={2022}
}