Tensorflow Implementation of the paper Chen et al. Deep Association Learning for Unsupervised Video Person Re-identification. BMVC2018. You may refer to our poster for a quick overview.
- Datasets: PRID2011 [3], iLIDS-VIDS [4], MARS [5].
- Python 2.7.
- Tensorflow version >= 1.4.0. (For model training)
- Matlab. (For model evaluation)
-
Download ImageNet pretrained models: mobilenet_v1 [1], resnet_v1_50 [2].
-
Convert image data to tfrecords. (Need to supply your paths in the following
.sh
file. Check theTODO
comments in the.sh
file.)
bash scripts/tf_convert_data.sh
Train models and extract features.
(Need to supply your paths in the following .sh
file. Check the TODO
comments in the .sh
file.)
Model implementation include the following .py
files:
train_dal.py
: build and run the training graph.association.py
: build the anchor learning graph and compute the association losses.network.py
: define the network.utils.py
: data preparation.
For example, to train the DAL model using mobilenet_v1
on MARS, run the the following scripts.
bash scripts/train_MARS.sh
Note that you may modify the type of deep model by changing the flag --model_name
(eg. --model_name=resnet_v1_50
).
You can also modify the number of gpus by changing the flag --num_gpus
. (eg. --num_gpus=2
).
Test model performance in matlab.
Evaluation codes are placed under the directory evaluation
.
For examples, to test the DAL model performance trained on MARS in matlab, run the following command.
clear; model_name = 'mobilenet_b64_dal'; CMC_mAP_MARS
Please refer to the following if this repository is useful for your research.
@inproceedings{chen2018bmvc,
title={Deep Association Learning for Unsupervised Video Person Re-identification},
author={Chen, Yanbei and Zhu, Xiatian and Gong, Shaogang},
booktitle={Proceedings of the British Machine Vision Conference (BMVC)},
year={2018}
}
This project is licensed under the MIT License - see the LICENSE.md file for details.
[1] Howard et al. MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications. arXiv 2017.
[2] He et al. Deep Residual Learning for Image Recognition. CVPR 2016.
[3] Hirzer et al. Person Re-Identification by Descriptive and Discriminative Classification. SCIA 2011.
[4] Wang et al. Person Re-Identification by Video Ranking. ECCV 2014.
[5] Zheng et al. MARS: A Video Benchmark for Large-Scale Person Re-identification. ECCV 2016.
This repository is partially built upon the tensorflow/models repository. The evaluation code (cmc & mAP) is partially borrowed from the MARS-evaluation repository.