Interpretable and Generalizable Person Re-Identification with Query-Adaptive Convolution and Temporal Lifting
This PyTorch code is proposed in our paper [1]. A Chinese blog is available in 再见,迁移学习?可解释和泛化的行人再辨识.
- 2/7/2020: An important update: include a pre-training function for a better initialization, so that the results are now more stable.
- 11/26/2020: Include the IBN-Net as backbone, and the RandPerson dataset.
- Pytorch (>1.0)
- sklearn
- scipy
Download some public datasets (e.g. Market-1501, DukeMTMC-reID, CUHK03-NP, MSMT) on your own, extract them in some folder, and then run the followings.
python main.py --dataset market --testset duke[,market,msmt] [--data-dir ./data] [--exp-dir ./Exp]
For more options, run "python main.py --help". For example, if you want to use the ResNet-152 as backbone, specify "-a resnet152". If you want to train on the whole dataset (as done in our paper for the MSMT17), specify "--combine_all".
python main.py --dataset market --testset duke[,market,msmt] [--data-dir ./data] [--exp-dir ./Exp] --evaluate
- Updated performance (%) of QAConv under direct cross-dataset evaluation without transfer learning or domain adaptation:
Backbone | Training set | Test set | |||||||
Market | Duke | CUHK | MSMT | ||||||
Rank-1 | mAP | Rank-1 | mAP | Rank-1 | mAP | Rank-1 | mAP | ||
ResNet-50 | Market | - | - | 49.5 | 29.7 | 10.6 | 9.3 | 26.4 | 8.3 |
MSMT (all) | 73.8 | 44.1 | 69.7 | 51.8 | 24.6 | 22.8 | - | - | |
RandPerson | 65.6 | 34.8 | 59.4 | 36.1 | 14.3 | 11.0 | 34.3 | 10.7 | |
IBN-Net-b (ResNet-50) | Market | - | - | 54.0 | 35.0 | 12.4 | 11.3 | 35.6 | 12.2 |
MSMT (all) | 76.0 | 47.9 | 71.6 | 53.6 | 27.1 | 25.0 | - | - | |
RandPerson | 68.0 | 36.8 | 61.7 | 38.9 | 12.9 | 10.8 | 36.6 | 12.1 |
Note: results are obtained by neck=64, batch_size=8, lr=0.005, epochs=15, and step_size=10 (except for RandPerson epochs=4 and step_size=2), trained on one single GPU. By this setting the traininig and testing time is much reduced.
- Performance (%) of QAConv in the ECCV paper, with ResNet-152 under direct cross-dataset evaluation:
Method | Training set | Test set | Rank-1 | mAP |
---|---|---|---|---|
QAConv | Market | Duke | 54.4 | 33.6 |
QAConv + RR + TLift | Market | Duke | 70.0 | 61.2 |
QAConv | MSMT | Duke | 72.2 | 53.4 |
QAConv + RR + TLift | MSMT | Duke | 82.2 | 78.4 |
QAConv | Duke | Market | 62.8 | 31.6 |
QAConv + RR + TLift | Duke | Market | 78.7 | 58.2 |
QAConv | MSMT | Market | 73.9 | 46.6 |
QAConv + RR + TLift | MSMT | Market | 88.4 | 76.0 |
QAConv | Market | MSMT | 25.6 | 8.2 |
QAConv | Duke | MSMT | 32.7 | 10.4 |
QAConv | Market | CUHK03-NP | 14.1 | 11.8 |
QAConv | Duke | CUHK03-NP | 11.0 | 9.4 |
QAConv | MSMT | CUHK03-NP | 32.6 | 28.1 |
The above pre-trained models can also be downloaded from Baidu (access code: 52cv), thanks to 52CV.
Shengcai Liao
Inception Institute of Artificial Intelligence (IIAI)
[email protected]
[1] Shengcai Liao and Ling Shao, "Interpretable and Generalizable Person Re-Identification with Query-Adaptive Convolution and Temporal Lifting." In the 16th European Conference on Computer Vision (ECCV), 23-28 August, 2020.
@inproceedings{Liao-ECCV2020-QAConv,
title={{Interpretable and Generalizable Person Re-Identification with Query-Adaptive Convolution and Temporal Lifting}},
author={Shengcai Liao and Ling Shao},
booktitle={European Conference on Computer Vision (ECCV)},
year={2020}
}