Home

Awesome

Learning Enriched Features for Real Image Restoration and Enhancement (ECCV 2020)

Syed Waqas Zamir, Aditya Arora, Salman Khan, Munawar Hayat, Fahad Shahbaz Khan, Ming-Hsuan Yang, Ling Shao

paper supplement video slides

<hr />

News

<hr />

Abstract: With the goal of recovering high-quality image content from its degraded version, image restoration enjoys numerous applications, such as in surveillance, computational photography, medical imaging, and remote sensing. Recently, convolutional neural networks (CNNs) have achieved dramatic improvements over conventional approaches for image restoration task. Existing CNN-based methods typically operate either on full-resolution or on progressively low-resolution representations. In the former case, spatially precise but contextually less robust results are achieved, while in the latter case, semantically reliable but spatially less accurate outputs are generated. In this paper, we present a novel architecture with the collective goals of maintaining spatially-precise high-resolution representations through the entire network, and receiving strong contextual information from the low-resolution representations. The core of our approach is a multi-scale residual block containing several key elements: (a) parallel multi-resolution convolution streams for extracting multi-scale features, (b) information exchange across the multi-resolution streams, (c) spatial and channel attention mechanisms for capturing contextual information, and (d) attention based multi-scale feature aggregation. In the nutshell, our approach learns an enriched set of features that combines contextual information from multiple scales, while simultaneously preserving the high-resolution spatial details. Extensive experiments on five real image benchmark datasets demonstrate that our method, named as MIRNet, achieves state-of-the-art results for a variety of image processing tasks, including image denoising, super-resolution and image enhancement.

<details> <summary> <strong>Network Architecture</strong> (click to expand) </summary> <p align="center"> <img src = "https://i.imgur.com/vmywppl.png" width="700"> <br/> <b> Overall Framework of MIRNet </b> </p> <table> <tr> <td> <img src = "https://i.imgur.com/tqpje3M.png" width="600"> </td> <td> <img src = "https://i.imgur.com/DQ6SYaH.png" width="300"> </td> </tr> <tr> <td><p align="center"><b>Selective Kernel Feature Fusion (SKFF)</b></p></td> <td><p align="center"> <b>Downsampling Module</b></p></td> </tr> </table> <table> <tr> <td> <img src = "https://i.imgur.com/FmHQ0VD.png" width="600"> </td> <td> <img src = "https://i.imgur.com/aOAFSkq.png" width="300"> </td> </tr> <tr> <td><p align="center"><b>Dual Attention Unit (DAU)</b></p></td> <td><p align="center"><b>Upsampling Module</b></p></td> </tr> </table> </details>

Installation

The model is built in PyTorch 1.1.0 and tested on Ubuntu 16.04 environment (Python3.7, CUDA9.0, cuDNN7.5).

For installing, follow these intructions

sudo apt-get install cmake build-essential libjpeg-dev libpng-dev
conda create -n pytorch1 python=3.7
conda activate pytorch1
conda install pytorch=1.1 torchvision=0.3 cudatoolkit=9.0 -c pytorch
pip install matplotlib scikit-image opencv-python yacs joblib natsort h5py tqdm

Training

  1. Download the SIDD-Medium dataset from here
  2. Generate image patches
python generate_patches_SIDD.py --ps 256 --num_patches 300 --num_cores 10
  1. Download validation images of SIDD and place them in ../SIDD_patches/val

  2. Install warmup scheduler

cd pytorch-gradual-warmup-lr; python setup.py install; cd ..
  1. Train your model with default arguments by running
python train_denoising.py

Note: Our model is trained with 2 Nvidia Tesla-V100 GPUs. See #5 for changing the model parameters.

Evaluation

You can download, at once, the complete repository of MIRNet (including pre-trained models, datasets, results, etc) from this Google Drive link, or evaluate individual tasks with the following instructions:

Image Denoising

Testing on SIDD dataset

python test_sidd_rgb.py --save_images

Testing on DND dataset

python test_dnd_rgb.py --save_images

Image Super-resolution

python test_super_resolution.py --save_images --scale 3
python test_super_resolution.py --save_images --scale 4

Image Enhancement

Testing on LOL dataset

python test_enhancement.py --save_images --input_dir ./datasets/lol/ --result_dir ./results/enhancement/lol/ --weights ./pretrained_models/enhancement/model_lol.pth

Testing on Adobe-MIT FiveK dataset

python test_enhancement.py --save_images --input_dir ./datasets/fivek_sample_images/ --result_dir ./results/enhancement/fivek/ --weights ./pretrained_models/enhancement/model_fivek.pth

Results

Experiments are performed on five real image datasets for different image processing tasks including, image denoising, super-resolution and image enhancement. Images produced by MIRNet can be downloaded from Google Drive link.

<details> <summary> <strong>Image Denoising</strong> (click to expand) </summary> <img src = "https://i.imgur.com/te123qk.png" ></details> <details> <summary> <strong>Image Super-resolution </strong> (click to expand) </summary> <img src = "https://i.imgur.com/pBdUPXa.png" ></details> <details> <summary> <strong>Image Enhancement</strong> (click to expand) </summary> <img src = "https://i.imgur.com/TZRBlux.png" ></details>

Other Implementations

Citation

If you use MIRNet, please consider citing:

@inproceedings{Zamir2020MIRNet,
    title={Learning Enriched Features for Real Image Restoration and Enhancement},
    author={Syed Waqas Zamir and Aditya Arora and Salman Khan and Munawar Hayat
            and Fahad Shahbaz Khan and Ming-Hsuan Yang and Ling Shao},
    booktitle={ECCV},
    year={2020}
}

Contact

Should you have any question, please contact waqas.zamir@inceptioniai.org

Our Related Works