GithubHelp home page GithubHelp logo

jiao133 / mgcam Goto Github PK

View Code? Open in Web Editor NEW

This project forked from developfeng/mgcam

0.0 1.0 0.0 36.02 MB

Mask data and code for 'Mask-guided Contrastive Attention Model for Person Re-Identification' (CVPR-2018)

Python 98.03% Shell 1.97%

mgcam's Introduction

MGCAM


  • Mask-guided Contrastive Attention Model (MGCAM) for Person Re-Identification
  • Code Version 1.0
  • E-mail: [email protected]

i. Overview ii. Copying iii. Use

i. OVERVIEW

This code implements the paper:

Chunfeng Song, Yan Huang, Wanli Ouyang, and Liang Wang. Mask-guided Contrastive Attention Model for Person Re-Identification. In CVPR, 2018.

If you find this work is helpful for your research, please cite our paper [PDF].

ii. COPYING

We share this code only for research use. We neither warrant correctness nor take any responsibility for the consequences of using this code. If you find any problem or inappropriate content in this code, feel free to contact us ([email protected]).

iii. USE

This code should work on Caffe with Python layer (pycaffe). You can install Caffe from here.

(1) Data Preparation.
Download the original datasets and their masks: MARS, Market-1501, CUHK-03, and their masks from Baidu Yun OR Google Drive.

For Market-1501 and CUHK-03, you need to run the spilt code(./data/gen_market1501_and_cuhk03_train_set.py).

(2) Model Training. Here, we take MARS as an example. The other two datasets are the same.

cd ./experiments/mars

First eidt the 'im_path', 'gt_path' and 'dataset' in the prototxt file, e.g., the MGCAM-only and MGCAM-Siamese version for MARS dataset is 'mgcam_train.prototxt' and 'mgcam_siamese_train.prototxt', respectively.

Then, we can train the MGCAM model from scratch with the command:

sh run_mgcam.sh

It will take roughly 15 hours for single Titan X.

Finally, we can fine-tune the MGCAM model with siamese loss via run the commman:

sh run_mgcam_siamese.sh

It will take roughly 5 hours for single Titan X.

(3) Evaluation.
Taking MARS for example, run the code in './evaluation/extract_feature_mars.py' to extract the IDE features, and then run the CMC and mAP evaluation with the MARS-evaluation code by Liang Zheng et al., or the Re-Ranking by Zhun Zhong et al.

mgcam's People

Contributors

developfeng avatar

Watchers

James Cloos 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.