In this package, we provide our training and testing code written in Matconvnet for the paper [A Discriminatively Learned CNN Embedding for Person Re-identification] (https://arxiv.org/abs/1611.05666).
We also include matconvnet-beta23 which has been modified for our paper. All codes have been test on Ubuntu14.04 and Ubuntu16.04 with Matlab R2015b.
- Xuanyi Dong also realizes our paper in Caffe. Thanks!
#Dataset Download [Market1501 Dataset] (http://www.liangzheng.org/Project/project_reid.html)
#To Test
-
Use
start-zzd.sh
to start matlab. (You need to add your CUDA path in it. Then just type./start-zzd.sh
to run it.) -
Compile matconvnet. (You just need to uncomment and modify some lines in
gpu_compile.m
and run it. Try it~) If you fail in compilation, you may refer to http://www.vlfeat.org/matconvnet/install/ -
After compilation, run
test2/test_gallery_res.m
to extract the features of gallery. They will store in a .mat file. You can use it to do evaluation. (For example, you may modify the Market1501 baseline code to evaluate our model. It may take a while.)
#To Train
-
Compile matconvnet. If you fail in compilation, you can refer to http://www.vlfeat.org/matconvnet/install/
-
Add your dataset path into
prepare_data.m
and run it. Make sure the code outputs the right image path. -
Run
train_id_net_res_2stream.m
to have fun.
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}
}
#Thanks Thanks for Xuanyi Dong to realize our paper in Caffe.
Thanks for Weihang Chen to report the bug in prepare_data.m
.