Skip to content

Latest commit

 

History

History
182 lines (160 loc) · 4.82 KB

README.md

File metadata and controls

182 lines (160 loc) · 4.82 KB

SIF: Self-Inspirited Feature Learning for Person Re-Identification

Introduction

SIF is a new training method for person re-identification (Re-ID) networks. It is published recently on IEEE TIP - SIF: Self-Inspirited Feature Learning for Person Re-Identification. Given an existing Re-ID network, an auxiliary branch is added into the network only in the training stage, while the structure of the original network stays unchanged during the testing stage.

This project is the implementation of SIF on some commonly used baseline networks. Our code is adapted from the open-reid library (https://github.com/Cysu/open-reid).

Datasets

  • Market-1501

    Download using:

    wget http://188.138.127.15:81/Datasets/Market-1501-v15.09.15.zip <path/to/where/you/want>
    unzip <path/to/>/Market-1501-v15.09.15.zip
    
  • CUHK03

    1. Download cuhk03 dataset from here
    2. Unzip the file and you will get the cuhk03_release dir which include cuhk-03.mat
    3. Download "cuhk03_new_protocol_config_detected.mat" from here and put it with cuhk-03.mat. We need this new protocol to split the dataset.

    NOTICE: You need to change num_classes in network depend on how many people in your train dataset! e.g. 751 in Market1501.

The data structure should look like:

data/
    bounding_box_train/
    bounding_box_test/
    query/
    train.txt   
    val.txt
    query.txt
    gallery.txt

Here each *.txt file consists lines of the format: image file name, person id, camera id. train.txt consists images from bounding_box_train/, val.txt and query.txt consists images from query/, and gallery.txt consists images from bounding_box_test/.

RUN

Prerequisites

  • cudnn 7
  • CUDA 9
  • Pytorch v0.4.1
  • Python 2.7
  • torchvision
  • scipy
  • numpy
  • scikit_learn

Baseline ReID Methods

  • ResNet. We choose two configurations: ResNet50 and ResNet152.
  • DenseNet. We choose two configurations: DenseNet121 and DenseNet161.

Train and Evaluate

We provie two training methods: plain (traditional SGD optimization) and sif (our proposed SIF optimization). The training method could be specified by the argument training_method in run.sh

  • Train and Evaluate by running
    bash run.sh
    

Results

Evaluation metric: mAP (%) and CMC Rank-1 (%).

Models + Training_method Market-1501 CUHK03(Labeled) CUHK03(Detected) DukeMTMC-reID
mAP Rank-1 mAP Rank-1 mAP Rank-1 mAP Rank-1
ResNet50 + SGD 68.8 86.5 41.3 43.2 38.8 40.3 60.0 78.8
ResNet50 + SIF 71.8 87.9 46.9 48.2 45.3 47.1 61.6 79.3
DenseNet121 + SGD 71.6 88.3 41.1 43.7 38.1 39.7 62.0 80.3
DenseNet121 + SIF 74.8 90.3 48.5 50.6 44.8 46.6 65.3 89.5
ResNet152 + SGD 73.0 88.1 45.5 47.3 44.7 48.2 63.4 80.9
ResNet152 + SIF 75.8 89.6 52.3 54.0 49.5 52.9 66.0 82.6
DenseNet161 + SGD 74.3 89.5 49.8 51.9 48.3 51.6 64.2 82.0
DenseNet161 + SIF 78.0 91.8 55.1 58.6 51.8 54.4 68.0 84.6

Reference

Please cite our paper when you use SIF in your research:

Long Wei, Zhenyong Wei, Zhongming Jin, Zhengxu Yu, Jianqiang Huang, Deng Cai, Xiaofei He, and Xian-Sheng Hua. "SIF: Self-Inspirited Feature Learning for Person Re-Identification." IEEE Transactions on Image Processing 29 (2020): 4942-4951.