All models

swinir_gray_denoising

A Swin Transformer network that removes noise from a grayscale image.

Diffusion and generative · 240 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (16 KB)

Open in a new tab

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.

At a glance

Parameters
57.8K
Operations
240
Framework
PyTorch
Recurrent
No
Published
ICCV Workshops (arXiv 2021)
Cited by
4,689 (as of 9 October 2026)
Authors
Jingyun Liang, Jiezhang Cao, Guolei Sun and others
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m12182
Graph hash
72768c3971730ea46e2f03bb6a76c04616dda2b0d5bcb9741d256d917bcfad08
Skeleton hash
dfacff191ed6d995986f4a4a248bfd6d52191fd4023c3d06dff813380b088579
Architecture hash
5ff4e877a63f83d92c5ccbe49181c66e95386f46b2328d076df861a4bf7707aa
Diagram SHA-256
de4e9472e2d3a8c584607a8a766cab3c52c2704e5ad2a6e851d25d87ba43248d
TorchLens version
2.35.3
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

How this diagram was made

menagerie.classics.swinir:build_swinir_gray_denoising: build({})

What it is

SwinIR is an image restoration model based on the Swin Transformer. This model is the version for grayscale image denoising, one of the six settings the paper tests.

The network has three parts: shallow feature extraction, deep feature extraction and image reconstruction. A convolution layer extracts the shallow features, which go straight to the reconstruction module to preserve low-frequency information. The deep features come from a stack of residual Swin Transformer blocks (RSTB), each made of Swin Transformer layers, a convolution layer and a residual connection. Inside those layers self-attention is computed within local windows, and regular and shifted window partitions alternate so that information crosses window borders. Denoising needs no upsampling, so the reconstruction module is a single convolution layer. The network predicts the residual between the low-quality input and the high-quality image, not the image itself.

For denoising the paper trains with the Charbonnier loss. In its denoising comparisons the paper reports a margin of up to 0.3dB over the earlier DRUNet on the Urban100 dataset. The paper reports 12.0M parameters for SwinIR and 32.7M for DRUNet.

Key idea. The paper builds an image restoration network from residual Swin Transformer blocks and reports gains over earlier methods on super-resolution, denoising and JPEG artifact reduction with fewer parameters.

  • SwinIR
  • swinir gray denoising
  • grayscale image denoising
  • image denoising
  • image restoration
  • noise removal
  • residual swin transformer block
  • RSTB
  • shifted window attention
  • denoising transformer

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@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}, 
}