Giter Club home page Giter Club logo

person-reid's Introduction

Person Re-identification (person-reid)

A framewrok enabled mixed precision person re-identification. Currently it supports two ResNet-50 and MobileNet-V2. The pre-trained networks for both half-precision and single precision are avaialable in expt_res folder. POWERED BY TeCSAR

Prerequisites

  • PyTorch (V 1.0.0)
  • Apex: available here
  • Python 3

Installation

Datasets and pre-requirements

The core of this code is based on provided framework available here. Please follow the mentioned instruction about datasets and switches.

Different networks

I added two switches named --net, and --net_pretrained_path for seclecting the network model and pre-trained model based on ImageNet dataset respectively. The --net switch can be assigned to mobilenetV2 and resnet50 options. I also provided a pretrained mobilenet-v2 file named mobilenet_v2.pth.tar from here.

Mixed precision

A new added switch named --opt-level selects the precision as follows:

  • O0: pure 32-bit (single precision) training and inference.
  • O2: Assigned error-tollorant operations, such as GeMM ,to 16-bit (half) precision.

Training will not converge for O3 opttions. Morover, even for O2 options, loss function should be calculated in single precision. More information can be find here.

Demo

I have provided a shell script for each of the following tasks:

Train

Run the trainMe.sh:

./trainMe.sh

Test

Run the testMe.sh:

./testMe.sh

Visualization

Run the vis_res.sh:

./vis_res.sh

Extracting witghts model and exporting ONNX file

Run the extractModels.sh:

./extractModels.sh

Citing the Real-Time Person Re-identification

Please cite the following paper if it helps your research work:

@InProceedings{10.1007/978-3-030-27272-2_3,
author="Baharani, Mohammadreza
and Mohan, Shrey
and Tabkhi, Hamed",
editor="Karray, Fakhri
and Campilho, Aur{\'e}lio
and Yu, Alfred",
title="Real-Time Person Re-identification at the Edge: A Mixed Precision Approach",
booktitle="Image Analysis and Recognition",
year="2019",
publisher="Springer International Publishing",
address="Cham",
pages="27--39",
isbn="978-3-030-27272-2"
}

License

Copyright (c) 2018, University of North Carolina at Charlotte. All rights reserved. - see the LICENSE file for details.

To do:

[ ] Supporting ShuffleNet-V2 I was able to train the shuffleNetV2 in python2.7; however, I couldn't make Nvidia Apex working in python 2.7. I am not sure why this network cannot be trained in python3 with PyTorch v1.0.0.

Acknowledgments

person-reid's People

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.