lithium770 / Unsupervised-Person-re-ID-with-Stochastic-Training-Strategy

10 stars 2 forks source link

Python >=3.5 PyTorch >=1.0

Unsupervised Person Re-identification with Stochastic Training Strategy

This repository contains the implementation of Unsupervised Person Re-identification with Stochastic Training Strategy. Our code is based on SPCL and person-re-ranking.

Prepare Datasets

cd examples/data

Download the datasets DukeMTMC-reID, Market-1501, MSMT17. Then unzip them under the directory like

/examples/data
├── dukemtmc
│   └── DukeMTMC-reID
├── market1501
│   └── Market-1501-v15.09.15
├── msmt17
│   └── MSMT17_V1

Prepare Pre-trained Models

ImageNet-pretrained models for ResNet-50 will be automatically downloaded in the python script.

Training and test unsupervised model for person re-ID

We utilize 4 GTX-1080TI GPUs for training. Note that

# DukeMTMC-reID
CUDA_VISIBLE_DEVICES=0,1,2,3 python examples/train_usl.py -d dukemtmc --eps 0.5 --logs-dir logs/duke_resnet50

# Market-1501
CUDA_VISIBLE_DEVICES=0,1,2,3 python examples/train_usl.py -d market1501 --eps 0.5 --logs-dir logs/market_resnet50

# MSMT17_V1
CUDA_VISIBLE_DEVICES=0,1,2,3 python examples/train_usl.py -d msmt17 --eps 0.7 --logs-dir logs/msmt_resnet50