Coder Social home page Coder Social logo

person_search's Introduction

Person Search

Introduction

A pytorch implementation for CVPR 2017 "Joint Detection and Identification Feature Learning for Person Search".

The code is based on the offcial caffe version.

Highlights

  • Simpler code: After reduction and refactoring, the current version is simpler and easier to understand.
  • Pure Pytorch code: Numpy is not used, except for data loading.

Installation

Run pip install -r requirements.txt in the root directory of the project

torchvision must be greater than 0.3.0, as we need torchvision.ops.nms

Quick Start

Let's say $ROOT is the root directory.

  1. Download CUHK-SYSU (google drive or baiduyun) dataset, unzip to $ROOT/data/dataset/
  2. Download our trained model (google drive or baiduyun) (extraction code: uuti) to $ROOT/data/trained_model/

After the above two steps, the directory structure should look like this:

$ROOT/data
├── dataset
│   ├── annotation
│   ├── Image
│   └── README.txt
└── trained_model
    └── checkpoint_step_50000.pth

BTW, $ROOT/data saves all experimental data, include: dataset, pretrained model, trained model, and so on.

  1. Run python tools/demo.py --gpu 0 --checkpoint data/trained_model/checkpoint_step_50000.pth. And then you can checkout the result in imgs directory.

demo.jpg

Train

  1. Prepare dataset as we mentioned in Quick Start section.
  2. Download pretrained model (google drive or baiduyun) (extraction code ucnw) to $ROOT/data/pretrained_model/
  3. python tools/train_net.py --gpu 0
  4. Trained model will be saved to $ROOT/data/trained_model/

You can check the usage of train_net.py by running python tools/train_net.py -h

Test

python tools/test_net.py --gpu 0 --checkpoint data/trained_model/checkpoint_step_50000.pth

The result should be around:

Search ranking:
   mAP = 76.78%
   Top- 1 = 77.48%
   Top- 5 = 88.48%
   Top-10 = 91.52%

person_search's People

Contributors

serend1p1ty 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.