
swinir_gray_denoising
Diffusion and generative240 ops57.8K params
SwinIR for color JPEG artifact removal: window-7 Swin attention predicting a residual over the compressed input.
Image classification · 240 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
How this diagram was made
menagerie.classics.swinir:build_swinir_color_jpeg_car: build({}) SwinIR is an image restoration model built on the Swin Transformer, offered as a strong baseline for the field. Image restoration here means recovering a high-quality image from a downscaled, noisy or compressed one. Its three parts are shallow feature extraction, deep feature extraction and high-quality image reconstruction.
The shallow module is a single convolution whose output is sent straight to the reconstruction module to preserve low-frequency information. Deep features come from a stack of residual Swin Transformer blocks (RSTB), each holding Swin Transformer layers, a convolution layer and a residual connection. A Swin Transformer layer partitions the input into non-overlapping M × M local windows and attends within each one. Long-range dependencies come from the shifted window mechanism. The convolution at the end of the deep module brings the inductive bias of convolution into the Transformer network. The same feature extraction modules serve every restoration task, while the reconstruction module changes per task.
The standard setting uses 6 RSTBs, 6 STLs per block, window size 8, 180 channels and 6 attention heads. For tasks without upsampling, such as JPEG compression artifact reduction, a single convolution layer does the reconstruction. It also uses residual learning, predicting the residual between the low-quality and high-quality image rather than the image itself. The window size drops to 7 for this task because 8 caused a significant performance drop, possibly because JPEG encodes 8 × 8 blocks. Training uses the Charbonnier loss. On Classic5 and LIVE1 across quality factors, SwinIR gains at least 0.11 dB and 0.07 dB on average. It does so with 11.5M parameters, against 32.7M for the previous best model DRUNet. Across tasks the paper reports gains of up to 0.14 to 0.45 dB over prior methods with up to 67% fewer parameters.
Key idea. A Swin-Transformer-based restoration baseline whose deep feature extractor is a stack of residual Swin Transformer blocks, each pairing several Swin Transformer layers with a residual connection.
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
@misc{liang2021swinirimagerestorationusing,
title={SwinIR: Image Restoration Using Swin Transformer},
author={Jingyun Liang and Jiezhang Cao and Guolei Sun and Kai Zhang and Luc Van Gool and Radu Timofte},
year={2021},
eprint={2108.10257},
archivePrefix={arXiv},
primaryClass={eess.IV},
url={https://arxiv.org/abs/2108.10257},
}