-
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
-
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
-
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.
You can modify the configuration file config.yml
before training.
Then run
python3 train.py
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.
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