This paper is accepted by CVPR2023 (highlight). [paper]
Authors: Yihao Liu, Jingwen He, Jinjin Gu, Xiangtao Kong, Yu Qiao, Chao Dong
- [2023/7/31] ⚡ We have released the codes! Please refer to the following instructions.
For pretraining, the encoder accepts a degraded input image and outputs the image representation. The degraded input image is synthesized online through a series of degradation operations. The decoder accepts a reference degradation embedding, which is obtained by a degradation representor
Example results of DegAE pretraining. For instance, given an input noise image and a reference blur image, DegAE attempts to transfer the blur degradation to the input image.
- Python >= 3.6
- Tested on PyTorch==1.13.1+cu116 (may work for other versions)
- Tested on Ubuntu 18.04.1 LTS
- NVIDIA GPU + CUDA (Tested on cuda11.6)
Download the pretrained models and put the downloaded models in the experiments/
folder.
Phase | Task | Backbone | Pretrained model |
---|---|---|---|
Pretrain | Degradation Transfer (Pretext Task) |
SwinIR Backbone |
[Baidu Disk] (token: iugr) [Google Drive] |
Pretrain | Degradation Transfer (Pretext Task) |
Restormer Backbone |
[Baidu Disk] (token: pcpy) [Google Drive] |
Downstream Finetune |
Dehaze (ITS) Complex Derain (Rain13K) Motion Deblur (GoPro) |
SwinIR Backbone |
[Baidu Disk] (token: bk4a) [Google Drive] |
Downstream Finetune |
Dehaze (ITS) Complex Derain (Rain13K) Motion Deblur (GoPro) |
Restormer Backbone |
[Baidu Disk] (token: 7bnf) [Google Drive] |
Note: All the settings can be adjusted and specified in the corresponding yml file.
- Test the pretext task with SwinIR backbone.
cd codes
python test_DegAE_Pretrain.py -opt options/test/test_DegAE_Pretrain_SwinIR.yml
- Test the pretext task with Restormer backbone.
cd codes
python test_DegAE_Pretrain.py -opt options/test/test_DegAE_Pretrain_Restormer.yml
- Test the pretrained dehaze model with SwinIR backbone.
cd codes
python test_DegAE_Finetune.py -opt options/test/test_DegAE_Finetune_Dehaze_SwinIR.yml
- Test the pretrained dehaze model with Restormer backbone.
cd codes
python test_DegAE_Finetune.py -opt options/test/test_DegAE_Finetune_Dehaze_Restormer.yml
- Test the pretrained dehaze model with SwinIR backbone.
cd codes
python test_DegAE_Finetune.py -opt options/test/test_DegAE_Finetune_Derain_SwinIR.yml
- Test the pretrained dehaze model with Restormer backbone.
cd codes
python test_DegAE_Finetune.py -opt options/test/test_DegAE_Finetune_Derain_Restormer.yml
- Test the pretrained dehaze model with SwinIR backbone.
cd codes
python test_DegAE_Finetune.py -opt options/test/test_DegAE_Finetune_Deblur_SwinIR.yml
- Test the pretrained dehaze model with Restormer backbone.
cd codes
python test_DegAE_Finetune.py -opt options/test/test_DegAE_Finetune_Deblur_Restormer.yml
If you find our work is useful, please kindly cite it.
@InProceedings{Liu_2023_DegAE,
author = {Liu, Yihao and He, Jingwen and Gu, Jinjin and Kong, Xiangtao and Qiao, Yu and Dong, Chao},
title = {DegAE: A New Pretraining Paradigm for Low-Level Vision},
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2023},
pages = {23292-23303}
}