A caffe-based implementation of this paper, providing whole training, testing and evaluation codes.
The official code (written in matconvnet) is available here.
- download Market-1501 dataset and put Market-1501 in $HOME/datasets/
cd examples/market1501/mat-codes
andmatlab -nodisplay -r 'generate_train(), exit()'
to generate train, test and qurey data lists.- Build with NCLL / cuda-8.0 / cudnn-v5.1
Market-1501 is one of the most popular person re-identification datasets.
Models can be found in models/market1501/model_name
Many scripts (e.g initialization, testing, training, extract feature and evaluation) can be found in examples/market1501/
[iter_size * batch_size] = real batch_size
- Link to the pre-trained CaffeNet model
python models/market1501/generate_caffenet.py
for generate caffenet based person re-ID network and solver files.sh models/market1501/caffenet/train.sh --gpu 0
for training models.sh examples/market1501/extract/extract_prediction.sh 0 caffenet fc7
for extracting features of query and test datacd examples/market1501/evaluation/
andevaluation('caffenet')
to evaluate performance of the trained model on Market-1501- final results are [1x128] : mAP = 0.402689, r1 precision = 0.639846 [Euclidean]
- Link to the pre-trained GoogleNet model
- GoogleNet-v1 model is already in
models/market1501/googlenet
sh models/market1501/googlenet/train.sh --gpu 0
sh examples/market1501/extract/extract_prediction.sh 0 googlenet pool5/7x7_s1
cd examples/market1501/evaluation/
andevaluation('googlenet')
- final results are : mAP = 0.511545, r1 precision = 0.735154 [Cos + Eucl]
- Link to the pre-trained VGG-16 model
python models/market1501/generate_vgg16.py
for generate caffenet based person re-ID network and solver files.sh models/market1501/vgg16/train.sh --gpu 2,3
for trainingsh examples/market1501/extract/extract_prediction.sh 0 vgg16 fc7
for extracting featurescd examples/market1501/evaluation/
andevaluation('vgg16')
to evaluate performance of vgg16/fc7 on Market-1501- final results are [2x 24] : mAP = 0.456417, r1 precision = 0.677257
python models/market1501/generate_resnet50.py
sh models/market1501/res50/train.sh --gpu 2,3
sh examples/market1501/extract/extract_prediction.sh 0 res50 pool5
- final results are : mAP = 0.585765, r1 precision = 0.790974 [Cos + Eucl]
Please cite the following papers in your publications if it helps your research:
@article{zheng2016discriminatively,
title={A Discriminatively Learned CNN Embedding for Person Re-identification},
author={Zheng, Zhedong and Zheng, Liang and Yang, Yi},
journal={TOMM},
year={2017}
}
@article{jia2014caffe,
Author = {Jia, Yangqing and Shelhamer, Evan and Donahue, Jeff and Karayev, Sergey and Long, Jonathan and Girshick, Ross and Guadarrama, Sergio and Darrell, Trevor},
Journal = {arXiv preprint arXiv:1408.5093},
Title = {Caffe: Convolutional Architecture for Fast Feature Embedding},
Year = {2014}
}