All Projects → ZhendongWang6 → Uformer

ZhendongWang6 / Uformer

Licence: MIT license
[CVPR 2022] Official repository for the paper "Uformer: A General U-Shaped Transformer for Image Restoration".

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects
matlab
3953 projects

Projects that are alternatives of or similar to Uformer

Restormer
[CVPR 2022--Oral] Restormer: Efficient Transformer for High-Resolution Image Restoration. SOTA for motion deblurring, image deraining, denoising (Gaussian/real data), and defocus deblurring.
Stars: ✭ 586 (+41.2%)
Mutual labels:  image-restoration, image-deblurring, image-deraining
Awesome-ICCV2021-Low-Level-Vision
A Collection of Papers and Codes for ICCV2021 Low Level Vision and Image Generation
Stars: ✭ 163 (-60.72%)
Mutual labels:  image-denoising, image-deblurring, image-deraining
Reproducible Image Denoising State Of The Art
Collection of popular and reproducible image denoising works.
Stars: ✭ 1,776 (+327.95%)
Mutual labels:  image-denoising, image-restoration
SwinIR
SwinIR: Image Restoration Using Swin Transformer (official repository)
Stars: ✭ 1,260 (+203.61%)
Mutual labels:  image-denoising, image-restoration
R2Net
Pytorch code for "Attention Based Real Image Restoration", IEEE Transactions on Neural Networks and Learning Systems, 2021
Stars: ✭ 19 (-95.42%)
Mutual labels:  image-denoising, image-deraining
Awesome-low-level-vision-resources
A curated list of resources for Low-level Vision Tasks
Stars: ✭ 35 (-91.57%)
Mutual labels:  image-denoising, image-deblurring
DudeNet
Designing and Training of A Dual CNN for Image Denoising (Knowledge-based Systems, 2021)
Stars: ✭ 45 (-89.16%)
Mutual labels:  image-denoising
ICCV2021-Single-Image-Desnowing-HDCWNet
This paper is accepted by ICCV 2021.
Stars: ✭ 47 (-88.67%)
Mutual labels:  image-restoration
PRIDNet
Code for the paper "Pyramid Real Image Denoising Network"
Stars: ✭ 47 (-88.67%)
Mutual labels:  image-denoising
sparselandtools
✨ A Python package for sparse representations and dictionary learning, including matching pursuit, K-SVD and applications.
Stars: ✭ 55 (-86.75%)
Mutual labels:  image-denoising
Color-Image-Inpainting
Image inpainting based on OMP and KSVD algorithm
Stars: ✭ 66 (-84.1%)
Mutual labels:  image-restoration
strollr2d icassp2017
Image Denoising Codes using STROLLR learning, the Matlab implementation of the paper in ICASSP2017
Stars: ✭ 22 (-94.7%)
Mutual labels:  image-denoising
CResMD
(ECCV 2020) Interactive Multi-Dimension Modulation with Dynamic Controllable Residual Learning for Image Restoration
Stars: ✭ 92 (-77.83%)
Mutual labels:  image-restoration
deep-atrous-guided-filter
Deep Atrous Guided Filter for Image Restoration in Under Display Cameras (UDC Challenge, ECCV 2020).
Stars: ✭ 32 (-92.29%)
Mutual labels:  image-restoration
AI-Lossless-Zoomer
AI无损放大工具
Stars: ✭ 940 (+126.51%)
Mutual labels:  image-restoration
UWCNN
Code and Datasets for "Underwater Scene Prior Inspired Deep Underwater Image and Video Enhancement", Pattern Recognition, 2019
Stars: ✭ 82 (-80.24%)
Mutual labels:  image-restoration
Image-Denoising-with-Deep-CNNs
Use deep Convolutional Neural Networks (CNNs) with PyTorch, including investigating DnCNN and U-net architectures
Stars: ✭ 54 (-86.99%)
Mutual labels:  image-denoising
miplib
A Python software library with a variety of functions for (optical) microscopy image restoration, reconstruction and analysis.
Stars: ✭ 54 (-86.99%)
Mutual labels:  image-restoration
Face-Renovation
Official repository of the paper "HiFaceGAN: Face Renovation via Collaborative Suppression and Replenishment".
Stars: ✭ 245 (-40.96%)
Mutual labels:  image-restoration
MemNet-Tensorflow
Tensorflow implementation of MemNet(http://cvlab.cse.msu.edu/pdfs/Image_Restoration%20using_Persistent_Memory_Network.pdf).
Stars: ✭ 41 (-90.12%)
Mutual labels:  image-deblurring

Uformer: A General U-Shaped Transformer for Image Restoration (CVPR 2022)

Zhendong Wang, Xiaodong Cun, Jianmin Bao, Wengang Zhou, Jianzhuang Liu, Houqiang Li

PWC PWC PWC PWC PWC PWC PWC PWC

Paper link: [Arxiv] [CVPR]

Update:

  • 2022.07.06 Upload new codes and models for our Uformer.
  • 2022.04.09 Upload results of Uformer on denoising (SIDD, DND), motion deblurring (GoPro, HIDE, RealBlur-J/-R), and defocus deblurring (DPDD).
  • 2022.03.02 Uformer has been accepted by CVPR 2022! 🔥
  • 2021.11.30 Update Uformer in Arxiv link. The new code, models and results will be uploaded.
  • 2021.10.28 Release the results of Uformer32 on SIDD and DND.
  • 2021.09.30 Release pre-trained Uformer16 for SIDD denoising.
  • 2021.08.19 Release a pre-trained model(Uformer32)! Add a script for FLOP/GMAC calculation.
  • 2021.07.29 Add a script for testing the pre-trained model on the arbitrary-resolution images.

In this paper, we present Uformer, an effective and efficient Transformer-based architecture, in which we build a hierarchical encoder-decoder network using the Transformer block for image restoration. Uformer has two core designs to make it suitable for this task. The first key element is a local-enhanced window Transformer block, where we use non-overlapping window-based self-attention to reduce the computational requirement and employ the depth-wise convolution in the feed-forward network to further improve its potential for capturing local context. The second key element is that we explore three skip-connection schemes to effectively deliver information from the encoder to the decoder. Powered by these two designs, Uformer enjoys a high capability for capturing useful dependencies for image restoration. Extensive experiments on several image restoration tasks demonstrate the superiority of Uformer, including image denoising, deraining, deblurring and demoireing. We expect that our work will encourage further research to explore Transformer-based architectures for low-level vision tasks.

Uformer

Package dependencies

The project is built with PyTorch 1.9.0, Python3.7, CUDA11.1. For package dependencies, you can install them by:

pip install -r requirements.txt

Pretrained model

Results from the pretrained model

Data preparation

Denoising

For training data of SIDD, you can download the SIDD-Medium dataset from the official url. Then generate training patches for training by:

python3 generate_patches_SIDD.py --src_dir ../SIDD_Medium_Srgb/Data --tar_dir ../datasets/denoising/sidd/train

For evaluation on SIDD and DND, you can download data from here.

Deblurring

For training on GoPro, and evaluation on GoPro, HIDE, RealBlur-J and RealBlur-R, you can download data from here.

Then put all the denoising data into ../datasets/denoising, and all the deblurring data into ../datasets/deblurring.

Training

Denoising

To train Uformer on SIDD, you can begin the training by:

sh script/train_denoise.sh

Deblurring

To train Uformer on GoPro, you can begin the training by:

sh script/train_motiondeblur.sh

Evaluation

To evaluate Uformer, you can run:

sh script/test.sh

For evaluate on each dataset, you should uncomment corresponding line.

Computational Cost

We provide a simple script to calculate the flops by ourselves, a simple script has been added in model.py. You can change the configuration and run:

python3 model.py

The manual calculation of GMacs in this repo differs slightly from the main paper, but they do not influence the conclusion. We will correct the paper later.

Citation

If you find this project useful in your research, please consider citing:

@InProceedings{Wang_2022_CVPR,
    author    = {Wang, Zhendong and Cun, Xiaodong and Bao, Jianmin and Zhou, Wengang and Liu, Jianzhuang and Li, Houqiang},
    title     = {Uformer: A General U-Shaped Transformer for Image Restoration},
    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
    month     = {June},
    year      = {2022},
    pages     = {17683-17693}
}

Acknowledgement

This code borrows heavily from MIRNet and SwinTransformer.

Contact

Please contact us if there is any question or suggestion(Zhendong Wang [email protected], Xiaodong Cun [email protected]).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].