SOTA Re-identification Methods and Toolbox
 
 
 
 
 
Go to file
L1aoXingyu 8a9c0ccfad Finish first version for fastreid 2020-02-10 22:13:04 +08:00
fastreid Finish first version for fastreid 2020-02-10 22:13:04 +08:00
projects/strong_baseline Finish first version for fastreid 2020-02-10 22:13:04 +08:00
scripts Update sampler code 2020-02-10 07:38:56 +08:00
tests Update sampler code 2020-02-10 07:38:56 +08:00
.gitignore Update sampler code 2020-02-10 07:38:56 +08:00
README.md Update sampler code 2020-02-10 07:38:56 +08:00

README.md

ReID_baseline

A strong baseline (state-of-the-art) for person re-identification.

We support

  • easy dataset preparation
  • end-to-end training and evaluation
  • multi-GPU distributed training
  • fast data loader with prefetcher
  • fast training speed with fp16
  • fast evaluation with cython
  • support both image and video reid
  • multi-dataset training
  • cross-dataset evaluation
  • high modular management
  • state-of-the-art performance with simple model
  • high efficient backbone
  • advanced training techniques
  • various loss functions
  • tensorboard visualization

Get Started

The designed architecture follows this guide PyTorch-Project-Template, you can check each folder's purpose by yourself.

  1. cd to folder where you want to download this repo

  2. Run git clone https://github.com/L1aoXingyu/reid_baseline.git

  3. Install dependencies:

  4. Prepare dataset

    Create a directory to store reid datasets under this repo via

    cd reid_baseline
    mkdir datasets
    
    1. Download dataset to datasets/ from baidu pan or google driver
    2. Extract dataset. The dataset structure would like:
    datasets
        Market-1501-v15.09.15
            bounding_box_test/
            bounding_box_train/
    
  5. Prepare pretrained model. If you use origin ResNet, you do not need to do anything. But if you want to use ResNet_ibn, you need to download pretrain model in here. And then you can put it in ~/.cache/torch/checkpoints or anywhere you like.

    Then you should set this pretrain model path in configs/softmax_triplet.yml.

  6. compile with cython to accelerate evalution

    cd csrc/eval_cylib; make
    

Train

Most of the configuration files that we provide, you can run this command for training market1501

bash scripts/train_openset.sh

Or you can just run code below to modify your cfg parameters

CUDA_VISIBLE_DEVICES='0,1' python tools/train.py -cfg='configs/softmax_triplet.yml' DATASETS.NAMES '("dukemtmc","market1501",)' SOLVER.IMS_PER_BATCH '256'

Test

You can test your model's performance directly by running this command

CUDA_VISIBLE_DEVICES='0' python tools/test.py -cfg='configs/softmax_triplet.yml' DATASET.TEST_NAMES 'dukemtmc' \
MODEL.BACKBONE 'resnet50' \
MODEL.WITH_IBN 'True' \
TEST.WEIGHT '/save/trained_model/path'