Giter Club home page Giter Club logo

mlcreid's Introduction

MLCReID

The implementation for the Unsupervised Person Re-identification via Multi-label Classification, which is accepted by CVPR2020

Preparetion

Prerequisites

  • Python 3.7
  • Pytorch 1.3
  • Torchvision 0.5
  • Easydict 1.9
  • Yaml 0.1

Data preparation

please refer to ECN to prepare dataset, the file structure is like

MLCReID/data
├── market
│   └── boundingbox_train
│   └── boundingbox_test
│   └── bounding_box_train_camstyle
│   └── query
├── duke
│   └── boundingbox_train
│   └── boundingbox_test
│   └── bounding_box_train_camstyle
│   └── query
└── msmt17
│   └── boundingbox_train
│   └── boundingbox_test
│   └── bounding_box_train_camstyle
│   └── query

Pretrained model

ResNet-50 pretrained on ImageNet is needed for model initialization, download and put it into models/imagenet dictionary (you can also omit this step by changing the code in resnet.py so that torchvision will automatically download it)

mkdir models
mkdir models/imagenet

The file tree should be

MLCReID/models
└── imagenet
    └── resnet50-19c8e357.pth

Logs and Output

The training logs and checkpoints are saved in output dictionary.

mkdir output

Train and Test

We utilize 1 GTX-2080TI GPU for model training, the hyper-parameters are set in configure files in experiments dictionary.

For example, training on Market-1501:

python tools/train.py --experiments experiments/market.yml --gpus 0

If you want to train model on DukeMTMC-reID or MSMT17, just replace the configure files.

python tools/train.py --experiments experiments/duke.yml --gpus 0
python tools/train.py --experiments experiments/msmt17.yml --gpus 0

If you want to test model, change the MODEL_FILE in configure file to the model path, then run following command:

python tools/test.py --experiments experiments/market.yml --gpus 0

You can also find these commands in scripts dictionary.

References

  • The code is mainly encouraged by ECN and HRNet

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.