This repository hosts the code for our paper End-to-End Deep Learning for Person Search. The code is modified from the py-faster-rcnn written by Ross Girshick.
- Requirements for
Caffe
andpycaffe
(see: Caffe installation instructions)
Note: Caffe must be built with support for Python layers!
# In your Makefile.config, make sure to have this line uncommented
WITH_PYTHON_LAYER := 1
# Unrelatedly, it's also recommended that you use CUDNN
USE_CUDNN := 1
You can download my Makefile.config for reference.
2. Python packages you might not have: cython
, python-opencv
, easydict (>=1.6)
3. MATLAB is required for processing the raw data.
-
Build the Cython modules
cd lib make
-
Build Caffe and pycaffe
cd caffe-fast-rcnn # Now follow the Caffe installation instructions here: # http://caffe.berkeleyvision.org/installation.html # If you're experienced with Caffe and have all of the requirements installed # and your Makefile.config in place, then simply do: make -j8 && make pycaffe
-
Request the dataset from sli [at] ee.cuhk.edu.hk (academic only)
-
Convert the raw dataset into formatted database
scripts/make_db.sh /path/to/the/downloaded/dataset.zip
-
Pretraining
data/scripts/fetch_imagenet_models.sh experiments/scripts/pretrain.sh
Or you may directly download a pretrained model from here to
output/psdb_pretrain/
. -
Training and evaluation
experiments/scripts/train.sh 0
Or you may directly download a trained model from here to
output/psdb_train/
, and test the performance withpython2 tools/test_net.py --gpu 0 \ --gallery_def models/psdb/VGG16/test_gallery.prototxt \ --probe_def models/psdb/VGG16/test_probe.prototxt \ --net output/psdb_train/VGG16_iter_100000.caffemodel \ --cfg experiments/cfgs/train.yml \ --imdb psdb_test
@article{xiao2016end,
title={End-to-End Deep Learning for Person Search},
author={Xiao, Tong and Li, Shuang and Wang, Bochao and Lin, Liang and Wang, Xiaogang},
journal={arXiv:1604.01850},
year={2016}
}