Torchreid: Deep learning person re-identification in PyTorch.
 
 
 
 
Go to file
KaiyangZhou 96fb2dfedc add xent+htri for video trainer 2018-03-12 14:18:22 +00:00
models add xent+htri trainer 2018-03-12 13:53:08 +00:00
.gitignore first commit 2018-03-11 21:17:48 +00:00
README.md update readme 2018-03-12 12:23:47 +00:00
data_manager.py add mars dataset 2018-03-12 12:06:40 +00:00
dataset_loader.py add xent+htri trainer 2018-03-12 13:53:08 +00:00
eval_metrics.py add xent+htri trainer 2018-03-12 13:53:08 +00:00
losses.py first commit 2018-03-11 21:17:48 +00:00
samplers.py add xent+htri trainer 2018-03-12 13:53:08 +00:00
train_img_model_xent.py add xent+htri trainer 2018-03-12 13:53:08 +00:00
train_img_model_xent_htri.py add xent+htri for video trainer 2018-03-12 14:18:22 +00:00
train_vid_model_xent.py add xent+htri for video trainer 2018-03-12 14:18:22 +00:00
train_vid_model_xent_htri.py add xent+htri for video trainer 2018-03-12 14:18:22 +00:00
transforms.py add xent+htri trainer 2018-03-12 13:53:08 +00:00
utils.py import torch in utils 2018-03-12 10:29:35 +00:00

README.md

deep-person-reid

This repo contains pytorch implementations of deep person re-identification approaches.

We will actively maintain this repo.

Prepare data

Create a directory to store reid datasets under this repo via mkdir data/.

Market1501 [7]:

  1. download dataset to data/ from http://www.liangzheng.org/Project/project_reid.html.
  2. extract dataset and rename to market1501.

MARS [8]:

  1. create a directory named mars/ under data/.
  2. download dataset to data/mars/ from http://www.liangzheng.com.cn/Project/project_mars.html.
  3. extract bbox_train.zip and bbox_test.zip.
  4. download split information from https://github.com/liangzheng06/MARS-evaluation/tree/master/info and put info/ in data/mars. (we want to follow the standard split in [8])

Train

Test

Results

Setup

  • Image size: 256-by-128
  • Batch: 32
  • Optimizer: Adam [6]
  • Loss functions:
    xent: cross entropy + label smoothing regularizer [5]
    htri: triplet loss with hard positive/negative mining [4]

Image person reid

Market1501

Model Size (M) Loss Rank-1 / -5 / -10 (%) mAP (%) Reported Rank Reported mAP
ResNet50 [1] 25.05 xent 85.8 / 94.4 / 96.3 70.1
ResNet50M [2] 30.01 xent 88.8 / 95.3 / 97.0 74.4 89.9 / - / - 75.6
DenseNet121 [3] 7.72 xent

Video person reid

MARS

Pretrained models

You can use wget to download the following models.

Model Loss Dataset Download
ResNet50 xent Market1501
ResNet50M xent Market1501
DenseNet121 xent Market1501

References

[1] He et al. Deep Residual Learning for Image Recognition. CVPR 2016.
[2] Yu et al. The Devil is in the Middle: Exploiting Mid-level Representations for Cross-Domain Instance Matching. arXiv:1711.08106.
[3] Huang et al. Densely Connected Convolutional Networks. CVPR 2017.
[4] Hermans et al. In Defense of the Triplet Loss for Person Re-Identification. arXiv:1703.07737.
[5] Szegedy et al. Rethinking the Inception Architecture for Computer Vision. CVPR 2016.
[6] Kingma and Ba. Adam: A Method for Stochastic Optimization. ICLR 2015.
[7] Zheng et al. Scalable Person Re-identification: A Benchmark. ICCV 2015.
[8] Zheng et al. MARS: A Video Benchmark for Large-Scale Person Re-identification. ECCV 2016.