Skip to content
Incremental Learning in Person Re-Identification
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmc_figures_data updated Sep 5, 2018
lwf_train_modules updated Sep 5, 2018
models fixed bugs May 21, 2019 fixed bugs May 21, 2019 updated Sep 5, 2018 updated Sep 5, 2018 updated Sep 5, 2018
requirements.txt updated Sep 5, 2018

Incremental Learning in Person Re-Identification


This repository contains code for our research. Paper can be found here, arXiv

Getting started

  1. cd ~/PATH_NAME
  2. Run git clone
  3. Install the specified dependencies, to install use pip3 install - requirements.txt
  4. Follow the below mentioned steps for preparation of dataset and performing training


  • OS: Linux/MacOS
  • Pytorch>=0.3

Install Dependencies


Dataset structure

This is the recommended file structure which was used

For preparation of Market1501

+-- Market1501
|   +-- bounding_box_test
|   +-- bounding_box_train

For preparation of Duke MTMC

+-- dukemtmc-reid
  |   +-- DukeMTMC-reID
    |   +-- bounding_box_test
    |   +-- bounding_box_train

Covariance loss metric has been added to all the modules. You're required to change the flags as per phase as described in paper

Create a directory named as data/ and use the standard directory structure.

For training on Market1501 (Phase 1):

$ python

For training on Duke MTMC (Phase 2).

$ python

Make sure to specify the model path properly

SAVED_MODEL_PATH needs to be specified to load the model generated from phase 1

To use ensembling and training, use

$ python

In this case, you'll have to specify amongst which pipelines do you want to perform ensembling. If you get better results, please file a PR.

To perform training:

While executing make sure to correctly carry out training (Phase 1 and Phase 2) properly as mentioned to achieve incremental learning

When training, log file would be created in the /log directory.


No. Dataset Rank 1 Rank 20 maP
1 Market1501 89.3% 98.3% 71.8%
2 DukeMTMC 80.0% 93.7% 60.2%
3 Market1501 70.2% 92.4% 41.2%

Takes around 8-9 hours to train the model for 950 epochs (convergence is usually achieved)


We used a ResNet50 along with different architecture of pipelines. We have used hybrid_convnet2. You are required to change the dimensions of the FC layer as per number of classes manually.

To resume training

$ mkdir saved_models

Then specify this as per dir structure in the main module

SAVED_MODEL_PATH = 'saved_models/p1.pth.tar'
checkpoint = torch.load(SAVED_MODEL_PATH)

For evaluation

$ python

Make sure to set the dataset and path of the models correctly, and also which pipeline to use for evaluation


Please cite this, if you use our work

    title={Incremental Learning in Person Re-Identification},
    author={Prajjwal Bhargava},
You can’t perform that action at this time.