Awesome
CUGAN
Toward Interactive Modulation for Photo-Realistic Image Restoration. (Paper Link)
By Haoming Cai*, Jingwen He*, Yu Qiao, and Chao Dong in CVPRW, NTIRE workshop 2021.
<p align="center"> <img src="figures/modulation.png"> Two-dimension Modulation </p> <p align="center"> <img src="figures/modulation_real.png"> Real-World Modulation </p>Dependencies and Installation
- pip install -r requirements.txt
- Python 3 (Recommend to use Anaconda)
- PyTorch >= 1.3
- NVIDIA GPU + CUDA
How to Test
-
Prepare the test dataset
- Download LIVE1 dataset and CBSD68 dataset from Google Drive
- Generate LQ images with different combinations of degradations using matlab
codes/data_scripts/generate_2D_val.m
.
-
Download the pretrained model
- Download pretrained CUGAN from Google Drive
- Modify the
pretrain_model_G
in configuration fileoptions/test/xxxxxx.yml
.
-
Test CUGAN with range of restoration strength
- Modify the configuration file
options/test/modulation_CUGAN.yml
. ❗️Importantly,cond_init
,range_mode
,range_stride
are crucial in this testing mode. - Run command:
cd codes python test-cugan_range-cond.py -opt options/test/modulation_CUGAN.yml
- Modify the configuration file
-
Test CUGAN with specific restoration strength
- Modify the configuration file
options/test/test_CUGAN.yml
. ❗️Importantly,cond
is crucial in this testing mode. - Run command:
cd codes python test-cugan_specific-cond.py -opt options/test/test_CUGAN.yml
- Modify the configuration file
How to Train
- Cooming Soon