Home

Awesome

Tiny Person ReID Baseline

Paper: "Bag of Tricks and A Strong Baseline for Deep Person Re-identification"[pdf]

This project refers the official code link and can reproduce the results as good as it on Market1501 when the input size is set to 256x128. If you find this project useful, please cite the offical paper.

@inproceedings{luo2019bag,
  title={Bag of Tricks and A Strong Baseline for Deep Person Re-identification},
  author={Luo, Hao and Gu, Youzhi and Liao, Xingyu and Lai, Shenqi and Jiang, Wei},
  booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops},
  year={2019}
}

Updates (Difference from Official Code)

Directory layout

.
├── config                  # hyperparameters settings
│   └── ...                 
├── datasets                # data loader
│   └── ...           
├── log                     # log and model weights             
├── loss                    # loss function code
│   └── ...   
├── model                   # model
│   └── ...  
├── processor               # training and testing procedures
│   └── ...    
├── solver                  # optimization code
│   └── ...   
├── tools                   # tools
│   └── ...
├── utils                   # metrics code
│   └── ...
├── train.py                # train code 
├── test.py                 # test code 
├── get_vis_result.py       # get visualized results 
├── docs                    # docs for readme              
└── README.md

Pipeline

<div align=center> <img src='docs/pipeline.jpg' width='800'> </div>

Pretrained Model

The pretrained (128x64) model can be downloaded now. Extraction code is u3q5.

Get Started

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

  2. Run git clone https://github.com/lulujianjie/person-reid-tiny-baseline.git

  3. Install dependencies:

Train

python train.py

Test

python test.py

To get visualized reID results, first create results folder in log dir, then:

python ./tools/get_vis_result.py

You will get the ranked results (query|rank1|rank2|...), like:

<div align=center> <img src='docs/results.png' width='600'> </div>

Results

modelmethodmAPRank1
resnet50triplet loss + softmax + center loss (B1)85.894.1
resnet50B1 + flipped feature86.393.9
resnet50B1 + Harder Example Mining86.294.4
resnet50B1 + flipped feature + Harder Example Mining86.694.6
resnet50B1 + Harder Example Mining + reranking94.195.6
resnet50B1 + Harder Example Mining + searched reranking94.295.8