Giter Site home page Giter Site logo

johndpope / person_search Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shuangli59/person_search

0.0 3.0 0.0 9.46 MB

Joint Detection and Identification Feature Learning for Person Search

Home Page: https://arxiv.org/abs/1604.01850

License: Other

Shell 2.13% Makefile 0.09% Python 90.31% C++ 0.10% Cuda 3.36% CSS 0.57% HTML 0.72% JavaScript 2.72%

person_search's Introduction

Person Search Project

This repository hosts the code for our paper Joint Detection and Identification Feature Learning for Person Search. The code is modified from the py-faster-rcnn written by Ross Girshick.

Installation

  1. Clone this repo recursively
git clone --recursive https://github.com/ShuangLI59/person_search.git
  1. Build Caffe with python layers and interface

We modified caffe based on Yuanjun's fork, which supports multi-gpu and memory optimization.

Apart from the official installation prerequisites, we have several other dependencies:

  • cudnn-v5.1
  • 1.7.4 < openmpi < 2.0.0
  • boost >= 1.55 (A tip for Ubuntu 14.04: sudo apt-get autoremove libboost1.54* then sudo apt-get install libboost1.55-all-dev)

Then compile and install the caffe with

cd caffe
mkdir build && cd build
cmake .. -DUSE_MPI=ON -DCUDNN_INCLUDE=/path/to/cudnn/include -DCUDNN_LIBRARY=/path/to/cudnn/lib64/libcudnn.so
make -j8 && make install
cd ../..

Please refer to this page for detailed installation instructions and troubleshooting.

  1. Build the Cython modules

Install some Python packages you might not have: Cython, python-opencv, easydict (>=1.6), PyYAML, protobuf, mpi4py. Then

cd lib && make && cd ..

Demo

Download our trained model to output/psdb_train/resnet50/, then

python2 tools/demo.py --gpu 0

Or you can use CPU only by setting --gpu -1.

Demo

Experiments

  1. Request the dataset from sli [at] ee.cuhk.edu.hk or xiaotong [at] ee.cuhk.edu.hk (academic only). Then
experiments/scripts/prepare_data.sh /path/to/the/downloaded/dataset.zip
  1. Download an ImageNet pretrained ResNet-50 model to data/imagenet_models.

  2. Training with GPU=0

experiments/scripts/train.sh 0 --set EXP_DIR resnet50

It will finish in around 18 hours, or you may directly download a trained model to output/psdb_train/resnet50/

  1. Evaluation

    By default we use 8 GPUs for faster evaluation. Please adjust the experiments/scripts/eval_test.sh with your hardware settings. For example, to use only one GPU, remove the mpirun -n 8 in L14 and change L16 to --gpu 0.

    experiments/scripts/eval_test.sh resnet50 50000 resnet50

    The result should be around

    search ranking:
      mAP = 75.47%
      top- 1 = 78.62%
      top- 5 = 90.24%
      top-10 = 92.38%
  2. Visualization

    The evaluation will also produce a json file output/psdb_test/resnet50/resnet50_iter_50000/results.json for visualization. Just copy it to vis/ and run python2 -m SimpleHTTPServer. Then open a browser and go to http://localhost:8000/vis.

    Visualization Webpage

Citation

@inproceedings{xiaoli2017joint,
  title={Joint Detection and Identification Feature Learning for Person Search},
  author={Xiao, Tong and Li, Shuang and Wang, Bochao and Lin, Liang and Wang, Xiaogang},
  booktitle={CVPR},
  year={2017}
}

Repo History

The first version of our paper was published in 2016. We have made substantial improvements since then and published a new version of paper in 2017. The original code was moved to branch v1 and the new code has been merged to master. If you have checked out our code before, please be careful on this and we recommend clone recursively into a new repo instead.

person_search's People

Contributors

cysu avatar ningzhou avatar shuangli59 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.