This repository contains the Pytorch implementation for the paper "Leader-based Multi-Scale Attention Deep Architecture for Person Re-identification"
- Python 3.6 or 3.7
- Pytorch >= 1.1.0
- tensorboardX
Please download Market-1501 dataset and organize it as follows
MuDeep_v2
├── dataset
│ └─ Market-1501 # for Market-1501 dataset
│ ├── bounding_box_train
│ ├── bounding_box_test
│ ├── query
│
├── train.py
In config.py
, set configurations for training, including NAME
, GPU_ID
and ROOT
. You can keep others as default to reproduce the result.
# example
__C.NAME = 'market' # name your model, the model files (.pkl) will be saved according to this name
__C.GPU_ID = 0,1
__C.ROOT = '/home/qxl/work/mudeep_v2/' # path to your project folder, all models and log files will be saved in this folder
...
In train.py
, using the following command lines to train the model
# example
engine = MuDeep_v2(cfg)
engine.train()
Once trained, the models and log file will be saved in ROOT/model/NAME/
and ROOT/log/NAME/
respectively.
By default, we evaluate the model every 5 epochs, the results will be written in ROOT/model/NAME/opt.txt
In train.py
, using the following command lines to evaluate the model
# example
engine = MuDeep_v2(cfg)
engine.test(model_path='/home/qxl/work/mudeep_v2/model/market', # path to your model
out_name='market_evaluate' # name the output TXT file
)
Name | Backbone | image size | mAP | Rank-1 | Rank-5 | Rank-10 | url |
---|---|---|---|---|---|---|---|
market_v1 | ResNet-50 | 384 x 192 | 85.61 | 95.46 | 98.43 | 98.93 | download |
market_v2 | ResNet-50 | 384 x 128 | 85.39 | 95.25 | 98.22 | 98.99 | download |
Name | Backbone | image size | Rank-1/mAP | ||
---|---|---|---|---|---|
DukeMTMC-reID | CUHK03-np Detected | CUHK03-np Labeled | |||
market_v1 | ResNet-50 | 384 x 192 | 46.68/27.33 | 10.64/8.36 | 11.79/9.34 |
market_v2 | ResNet-50 | 384 x 128 | 48.56/28.24 | 12.00/10.08 | 13.00/10.70 |
If you find this project useful in your research, please consider cite:
@article{qian2019leader,
title={Leader-based multi-scale attention deep architecture for person re-identification},
author={Qian, Xuelin and Fu, Yanwei and Xiang, Tao and Jiang, Yu-Gang and Xue, Xiangyang},
journal={IEEE transactions on pattern analysis and machine intelligence},
volume={42},
number={2},
pages={371--385},
year={2019},
publisher={IEEE}
}
Any questions or discussion are welcome!
Xuelin Qian ([email protected])