Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Restormer: Efficient Transformer for High-Resolution Image Restoration

paper supplement video slides Summary

News

  • Added Colab Demo. Open In Colab
  • Restormer is selected for an ORAL presentation at CVPR 2022 💫
  • Training codes are released 🔥
  • Testing codes and pre-trained models are released!

Abstract: Since convolutional neural networks (CNNs) perform well at learning generalizable image priors from large-scale data, these models have been extensively applied to image restoration and related tasks. Recently, another class of neural architectures, Transformers, have shown significant performance gains on natural language and high-level vision tasks. While the Transformer model mitigates the shortcomings of CNNs (i.e., limited receptive field and inadaptability to input content), its computational complexity grows quadratically with the spatial resolution, therefore making it infeasible to apply to most image restoration tasks involving high-resolution images. In this work, we propose an efficient Transformer model by making several key designs in the building blocks (multi-head attention and feed-forward network) such that it can capture long-range pixel interactions, while still remaining applicable to large images. Our model, named Restoration Transformer (Restormer), achieves state-of-the-art results on several image restoration tasks, including image deraining, single-image motion deblurring, defocus deblurring (single-image and dual-pixel data), and image denoising (Gaussian grayscale/color denoising, and real image denoising).


Network Architecture

Demo

To test the pre-trained Restormer models of Deraining on your own images, you can either use Google Colab Open In Colab, or command line as following

python demo.py --task Task_Name --input_dir path_to_images --result_dir save_images_here

Example usage to perform Deraining on a directory of images:

python demo.py --task Deraining --input_dir './demo/degraded/' --result_dir './demo/restored/'

Example usage to perform Deraining on an image directly:

python demo.py --task Deraining --input_dir './demo/degraded/portrait.jpg' --result_dir './demo/restored/'

Results

Image Deraining (click to expand)

Results on Rain100L Dataset

Results on Rain100H Dataset

Comaparisons with Different Models

Training and Evaluation

Training and Testing instructions for Deraining are provided in their respective directories. Here is a summary table containing hyperlinks for easy navigation:

Task Training Instructions Testing Instructions Restormer's Visual Results
Deraining Link Link Download

Acknowledgment: This code is based on the BasicSR toolbox and HINet.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages