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
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
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]
- 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]
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 this paper 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={arXiv preprint arXiv:1611.05666},
year={2016}
}
Caffe is a deep learning framework made with expression, speed, and modularity in mind. It is developed by Berkeley AI Research (BAIR)/The Berkeley Vision and Learning Center (BVLC) and community contributors.
Check out the project site for all the details like
- DIY Deep Learning for Vision with Caffe
- Tutorial Documentation
- BAIR reference models and the community model zoo
- Installation instructions
and step-by-step examples.
Please join the caffe-users group or gitter chat to ask questions and talk about methods and models. Framework development discussions and thorough bug reports are collected on Issues.
Happy brewing!
Caffe is released under the BSD 2-Clause license. The BAIR/BVLC reference models are released for unrestricted use.
Please cite Caffe in your publications if it helps your research:
@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}
}