HyperAIHyperAI

Command Palette

Search for a command to run...

5 months ago

Uformer: A General U-Shaped Transformer for Image Restoration

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

Uformer: A General U-Shaped Transformer for Image Restoration

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.

Code Repositories

lucidrains/ddpm-proteins
pytorch
Mentioned in GitHub
ZhendongWang6/Uformer
Official
pytorch
Mentioned in GitHub
lucidrains/uformer-pytorch
pytorch
Mentioned in GitHub

Benchmarks

BenchmarkMethodologyMetrics
deblurring-on-goproUformer-B
PSNR: 32.97
SSIM: 0.967
deblurring-on-hide-trained-on-goproUformer-B
PSNR (sRGB): 30.83
Params (M): 50.88
SSIM (sRGB): 0.952
deblurring-on-realblur-j-trained-on-goproUformer-B
PSNR (sRGB): 29.06
SSIM (sRGB): 0.884
deblurring-on-realblur-r-trained-on-goproUformer-B
PSNR (sRGB): 36.22
SSIM (sRGB): 0.957
deblurring-on-rsblurUformer-B
Average PSNR: 33.98
image-deblurring-on-goproUformer-B
PSNR: 32.97
Params (M): 50.88
SSIM: 0.967
image-dehazing-on-sots-indoorUformer
PSNR: 31.91
SSIM: 0.971
image-dehazing-on-sots-outdoorUformer
PSNR: 26.52
SSIM: 0.945
image-denoising-on-dndUformer-B
PSNR (sRGB): 39.98
SSIM (sRGB): 0.955
image-denoising-on-siddUformer-B
PSNR (sRGB): 39.89
SSIM (sRGB): 0.960
image-enhancement-on-tip-2018Uformer-B
PSNR: 29.28
SSIM: 0.917
single-image-desnowing-on-csdUFormer
Average PSNR (dB): 33.80

Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing
Get Started

Hyper Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp
Uformer: A General U-Shaped Transformer for Image Restoration | Papers | HyperAI