Uformer: A General U-Shaped Transformer for Image Restoration

Zhendong Wang, Xiaodong Cun, Jianmin Bao, Wengang Zhou, Jianzhuang Liu +1 more
6/6/2021
cs.CV

Official code: ZhendongWang6/Uformer (946 stars, MIT, PyTorch, last commit 2025-03-21).

Abstract

In this paper, we present Uformer, an effective and efficient Transformer-based architecture for image restoration, in which we build a hierarchical encoder-decoder network using the Transformer block. In Uformer, there are two core designs. First, we introduce a novel locally-enhanced window (LeWin) Transformer block, which performs nonoverlapping window-based self-attention instead of global self-attention. It significantly reduces the computational complexity on high resolution feature map while capturing local context. Second, we propose a learnable multi-scale restoration modulator in the form of a multi-scale spatial bias to adjust features in multiple layers of the Uformer decoder. Our modulator demonstrates superior capability for restoring details for various image restoration tasks while introducing marginal extra parameters and computational cost. Powered by these two designs, Uformer enjoys a high capability for capturing both local and global dependencies for image restoration. To evaluate our approach, extensive experiments are conducted on several image restoration tasks, including image denoising, motion deblurring, defocus deblurring and deraining. Without bells and whistles, our Uformer achieves superior or comparable performance compared with the state-of-the-art algorithms. The code and models are available at https://github.com/ZhendongWang6/Uformer.

View on arXivView PDF

Code Implementations(1)

PyTorchMIT

[CVPR 2022] Official implementation of the paper "Uformer: A General U-Shaped Transformer for Image Restoration".

946133Shell, MATLABJun 3, 20211 years agoMIT
deep-learningimage-deblurringimage-demoireingimage-denoisingimage-deraining+2 more

Similar Papers

Cite this paper

@article{wang2021uformer,
  title  = {Uformer: A General U-Shaped Transformer for Image Restoration},
  author = {Zhendong Wang and Xiaodong Cun and Jianmin Bao and Wengang Zhou and Jianzhuang Liu and Houqiang Li},
  year   = {2021},
  eprint = {2106.03106},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2106.03106}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2106.03106.svg)](https://codeofpaper.com/paper/2106.03106)

Discussion