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.
- pip install -r requirements.txt
- Python 3 (Recommend to use Anaconda)
- PyTorch >= 1.3
- NVIDIA GPU + CUDA
-
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
- Cooming Soon