This is a person re-identification (re-id) project that aims at learning generic deep features from multiple person re-id datasets.
We have integrated our self-brewed caffe into external/caffe
, which provides batch-normalization and multi-gpu parallel training. Please clone this project with the command:
git clone --recursive https://github.com/Cysu/person_reid.git
Apart from the official installation prerequisites, we have several other dependencies: cudnn-v4, openmpi, and 1.55 <= boost < 1.60. You may install them manually or by a package manager (apt-get, pacman, yum, etc.).
Then configure the Makefile.config
and compile the caffe.
cd external/caffe
cp Makefile.config.example Makefile.config
# Configure the libraries properly
make -j8 && make py
Download the following datasets.
- CUHK03
- CUHK01
- PRID
- VIPeR
- 3DPeS
- i-LIDS (I cannot find the link to the original dataset. This is my previous backup version.)
- Shinpuhkan (need to send an email to the authors)
Link the root directory of these datasets to our project.
ln -sf /path/to/the/root/of/datasets external/raw
-
Create a directory for experiment data and results
mkdir -p external/exp
or link against another external directory
ln -s /path/to/your/exp/directory external/exp
-
Convert raw datasets into a uniform data format
scripts/format_rawdata.sh
-
Convert formatted datasets into LMDBs.
scripts/make_dbs.sh
-
Merge all the datasets together for the joint single-task learning (JSTL).
scripts/merge_dbs.sh
Our experiments are organized into several groups:
- Baseline: training individually on each dataset
- Baseline: joint single task learning (JSTL)
- Our method: JSTL with domain guided dropout (DGD)
- Additional leave-one-out experiments
To train and test a model individually on a dataset, just run the script
scripts/exp_individually.sh prid
where the parameter is the dataset name, can be one of cuhk03
, cuhk01
, prid
, viper
, 3dpes
, ilids
.
First, pretrain a model using the mixed dataset with JSTL
scripts/exp_jstl.sh
After training, the script will use the pretrained model to do the evaluation directly on each individual dataset. The CMC accuracies printed out are corresponding to the JSTL entries in Table 3 of our paper.
Then, fine-tune the pretrained model on each dataset and evaluate the performance
scripts/exp_ft_jstl.sh
The CMC accuracies printed out are corresponding to the FT-JSTL entries in Table 3 of our paper.
Based on the pretrained JSTL model, we can compute the neuron impact scores (NIS) for each dataset, and resume the JSTL training with domain guided dropout.
scripts/exp_dgd.sh
The CMC accuracies printed out are corresponding to the JSTL+DGD entries in Table 3 of our paper.
Then, fine-tune the model on each dataset with domain guided dropout and evaluate the performance
scripts/exp_ft_dgd.sh
The CMC accuracies printed out are corresponding to the FT-(JSTL+DGD) entries in Table 3 of our paper.
We summarize some commonly used person re-id datasets below.
Name | Reference |
---|---|
3DPeS | Baltieri, et al., 3DPes: 3D people dataset for surveillance and forensics |
CUHK01 | Li, et al., Human reidentification with transferred metric learning |
CUHK02 | Li, et al., Locally Aligned Feature Transforms across Views |
CUHK03 | Li, et al., Deepreid: Deep filter pairing neural network for person re-identification |
i-LIDS | Zheng, et al., Associating groups of people |
PRID | Hirzer, et al., Person re-identification by descriptive and discriminative classification |
Shinpuhkan | Kawanishi, et al., Shinpuhkan2014: A Multi-Camera Pedestrian Dataset for Tracking People across Multiple Cameras |
VIPeR | Gray, et al., Evaluating appearance models for recognition, reacquisition, and tracking |