Code for paper "Semantics-Aware Deep Correspondence Structure Learning for Robust Person Re-Identification"
Clone the project with Caffe submodule
$ git clone --recursive https://github.com/yaqing01/DCSL.git
-
Download CUHK03/01 datasets from CUHK Person Re-identification Datasets
-
Unzip the datasets into the dataset/ folder
The image files are organized as
dataset/cuhk03/cuhk03_release/data/campair_1/01_0001_01.jpg
dataset/cuhk03/cuhk03_release/data/campair_1/01_0001_02.jpg
dataset/cuhk03/cuhk03_release/data/campair_1/01_0001_03.jpg
- Generate training data
cd dataset
python generate_training_pairs.py
cd ..
You only need to modify the following configurations in generate_training_pairs.py
set_no = 1 # the training/validation/test split
save_p = 'train_lmdb' # path to save lmdb
dataset_usage = [0,1,0,0,0] # dataset for evaluation
We have written all the model templates for training in models/reid/dcsl
, all we need is to generate the training protos with the specified configurations.
- Prepare for training
mkdir experiments
./models/reid/dcsl/prepare.sh
- Train the model using the generated proto files and you can download the pre-trained
bvlc_googlenet.caffemode
for fine-tuning.
./experiments/reid_dcsl/set01/train_model.sh [GPU-ID]
- Finally, you can evaluate and visualize the trained model by running
code/eval/cuhk03_test.ipynb
Please cite our work in your publications if it helps your research:
@inproceedings{ZhangLZZ16,
author = {Yaqing Zhang and Xi Li and Liming Zhao and Zhongfei Zhang},
title = {Semantics-Aware Deep Correspondence Structure Learning for Robust Person Re-Identification},
booktitle = {Proceedings of the Twenty-Fifth International Joint Conference on Artificial Intelligence, {IJCAI} 2016, New York, NY, USA, 9-15 July 2016},
pages = {3545--3551},
year = {2016},
}