Awesome
Degradation Autoencoder [CVPR2023 Highlight]
DegAE: A New Pretraining Paradigm for Low-level Vision
This paper is accepted by CVPR2023 (highlight). [paper]
Authors: Yihao Liu, Jingwen He, Jinjin Gu, Xiangtao Kong, Yu Qiao, Chao Dong
News
- [2023/7/31] :zap: We have released the codes! Please refer to the following instructions.
Method Introduction
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 $\phi$. Then, the decoder attempts to transfer the reference degradation to the corrupted input image. During Finetuning, the decoder is replaced by one convolution layer. We finetune the whole network on downstream tasks such as image dehaze, derain and motion deblur.
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.
Preparation
Dependencies
- 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)
Pretrained Models
Download the pretrained models and put the downloaded models in the experiments/
folder.
Phase | Task | Backbone | Pretrained model |
---|---|---|---|
Pretrain | Degradation Transfer <br> (Pretext Task) | SwinIR <br>Backbone | [Baidu Disk] <br>(token: iugr) <br> [Google Drive] |
Pretrain | Degradation Transfer <br> (Pretext Task) | Restormer <br>Backbone | [Baidu Disk] <br>(token: pcpy) <br> [Google Drive] |
Downstream <br>Finetune | Dehaze (ITS) <br> Complex Derain (Rain13K) <br> Motion Deblur (GoPro) | SwinIR <br>Backbone | [Baidu Disk]<br> (token: bk4a) <br> [Google Drive] |
Downstream <br>Finetune | Dehaze (ITS) <br> Complex Derain (Rain13K) <br> Motion Deblur (GoPro) | Restormer <br>Backbone | [Baidu Disk] <br>(token: 7bnf) <br> [Google Drive] |
Quick Inference
Pretrain Task: Degradation Autoencoder
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
Downstream Tasks
Dehaze
- 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
Complex Derain
- 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
Motion Deblur
- 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
Citation
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}
}