This repository contains the official implementation of the IJCV 2022 paper:
Learning Degradation-Invariant Representation for Robust Real-World Person Re-Identification
Yukun Huang1, Xueyang Fu1, Liang Li2, Zheng-Jun Zha1
1University of Science and Technology of China 2Institute of Computing Technology, Chinese Academy of Sciences
We propose a real-world Degradation Invariance Learning (DIL) framework, which can utilize training image pairs with different supervision types for content-degradation feature disentanglement. Using DIL as a proxy task can facilitate both low- and high-level downstream tasks such as person re-identification and low-light image enhancement.
- Python 3.8
- PyTorch 1.8.0
Download the MLR-CUHK03 dataset and reorganize the folders as follows:
├── resolution-reid
│ ├── MLR-CUHK03
│ ├── train
│ ├── val
│ ├── gallery
│ ├── query
│ ├── 0020
│ ├── 00020_c0_00000.jpg
│ ├── ...
To construct the cross-resolution MLR-CUHK03, MLR-VIPeR, and CAVIAR benchmarks, you may follow the AAAI 2018 paper "Deep Low-Resolution Person Re-Identification" and use the split protocol files provided in data_splits/
from Google Drive.
Trained model are provided. You may download it from Google Drive, then move the outputs
folder to your project's root directory.
The first training stage aims to learn disentangled representations of image content and degradation, you can run:
python train_dil.py --dataset mlr_cuhk03 --data_root path/to/resolution-reid/
The second training stage is for downstream tasks. For person Re-ID, you can run:
python train_reid.py --dataset mlr_cuhk03 --data_root path/to/resolution-reid/ --teacher_root path/to/teacher/
The teacher model weights can be downloaded from Google Drive.
To evaluate the Re-ID model on the MLR-CUHK03 dataset, you can run:
python test_reid.py --dataset mlr_cuhk03 --data_root path/to/resolution-reid/
The Re-ID performance of our provided model weights:
Rank@1=91.8 Rank@5=98.6 Rank@10=99.3 Rank@20=99.5 mAP=94.8
You can run the following command to obtain visualization results of degradation manipulation:
python visualize.py
The visualization results of degradation swapping:
The visualization results of degradation memory replay:
If you find the code useful, please kindly cite our works:
@article{huang2022degradation,
title={Learning Degradation-Invariant Representation for Robust Real-World Person Re-Identification},
author={Huang, Yukun and Fu, Xueyang and Li, Liang and Zha, Zheng-Jun},
journal={International Journal of Computer Vision},
volume={130},
number={11},
pages={2770--2796},
year={2022},
publisher={Springer}
}
@inproceedings{huang2020degradation,
title={Real-World Person Re-Identification via Degradation Invariance Learning},
author={Huang, Yukun and Zha, Zheng-Jun and Fu, Xueyang and Hong, Richang and Li, Liang},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
pages={14084--14094},
year={2020}
}