Skip to content

Implementation of "Spectral Feature Tansformation for Person Re-identification"

Notifications You must be signed in to change notification settings

LuckyDC/sft-reid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spectral Feature Transformation for Person Re-identification

Preparation

  1. Satisfy the dependency of the program. The program is developed on MXNet 1.3.1 and Python 3.5. You can install dependency as follow:

    pip3 -r requirement.txt
  2. Create directories to store logs or checkpoints.

    mkdir models log features pretrain_models
    mkdir models/duke models/msmt models/market models/cuhk
    mkdir log/duke log/msmt log/market log/cuhk
    mkdir features/duke features/msmt features/market features/cuhk
  3. Download datasets CUHK03-NP, MSMT17, Market-1501, DukeMTMC-reID, Market-1501 Distractors, and decompress them. You should separate Market-1501 distractors into 3 subsets(100k,100k,300k) before evaluating on it. Download parameters and symbol file of pretrained resnet-50 to pretrain_models/ directory.

Training

You can modify the configuration file config.yml before training. Then run

python3 train.py

Evaluation

We implement GPU version evaluation code which is much faster.

python3 eval.py GPU_ID MODEL_PATH

GPU_ID is the id of gpu used for evaluation. MODEL_PATH is the path of model file.

There is an example:

python3 eval.py 2 models/cuhk/baseline-sft0.1-dsup-0140.params

This command will also give re-ranked results in default.

Post-processing

You can perform post-processing independently.

python3 -m post_processing.post_clustering DATASET PREFIX

DATASET is the name of the dataset. PREFIX is the prefix model file. There is an exmaple:

python3 -m post_processing.post_clustering market baseline-gcn0.1-dsup-amsoftmax0.3-relu-140ep

About

Implementation of "Spectral Feature Tansformation for Person Re-identification"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages