Giter Club home page Giter Club logo

reid-mgn's Introduction

Multiple Granularity Network

Implement of paper:Learning Discriminative Features with Multiple Granularities for Person Re-Identification

Dependencies

  • Python >= 3.5
  • PyTorch >= 0.4.0
  • torchvision
  • scipy
  • numpy
  • scikit_learn

Current Result

Re-Ranking backbone mAP rank1 rank3 rank5 rank10
yes resnet50 94.33 95.58 97.54 97.92 98.46
no resnet50 86.15 94.95 97.42 98.07 98.93

Data

The data structure would look like:

data/
    bounding_box_train/
    bounding_box_test/
    query/

Market1501

Download from here

DukeMTMC-reID

Download from here

CUHK03

  1. Download cuhk03 dataset from "http://www.ee.cuhk.edu.hk/~xgwang/CUHK_identification.html"
  2. Unzip the file and you will get the cuhk03_release dir include cuhk-03.mat
  3. Download "cuhk03_new_protocol_config_detected.mat" from "https://github.com/zhunzhong07/person-re-ranking/tree/master/evaluation/data/CUHK03" and put it with cuhk-03.mat. We need this new protocol to split the dataset.
python utils/transform_cuhk03.py --src <path/to/cuhk03_release> --dst <path/to/save>

NOTICE:You need to change num_classes in network depend on how many people in your train dataset! e.g. 751 in Market1501

Weights

Pretrained weight download from google drive or baidu drive password:mrl5

Train

You can specify more parameters in opt.py

python main.py --mode train --data_path <path/to/Market-1501-v15.09.15> 

Evaluate

Use pretrained weight or your trained weight

python main.py --mode evaluate --data_path <path/to/Market-1501-v15.09.15> --weight <path/to/weight_name.pt> 

Visualize

Visualize rank10 query result of one image(query from bounding_box_test)

Extract features will take a few munutes, or you can save features as .mat file for multiple uses

image

python main.py --mode vis --query_image <path/to/query_image> --weight <path/to/weight_name.pt> 

Citation

@ARTICLE{2018arXiv180401438W,
    author = {{Wang}, G. and {Yuan}, Y. and {Chen}, X. and {Li}, J. and {Zhou}, X.},
    title = "{Learning Discriminative Features with Multiple Granularities for Person Re-Identification}",
    journal = {ArXiv e-prints},
    year = 2018,
}

reid-mgn's People

Contributors

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