All models

swinir_classical_sr_x3

SwinIR set up for classical image super-resolution at scale factor 3, built on the Swin Transformer.

Diffusion and generative · 242 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 (19 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
132.1K
Operations
242
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
m12178
Graph hash
7176b9e7a14681f4c93a819d2c382b1dab8cc50b294c3679dd1ee53408303e4a
Skeleton hash
741dfcbb6176f1fec686b9786287d40b85448e7056bc41468d3d17b8f7addf46
Architecture hash
c2c2442fdb5c488b3bc78980c01fbda3109a27bc38b41a0dd5cc7ac08656c268
Diagram SHA-256
f90ad811e955ea3a73d8b207133fcf984546ff002a57e3abb4ed215fc4783d06
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_classical_sr_x3: build({})

What it is

About this model's family

SwinIR is an image restoration model based on the Swin Transformer: it restores a high-quality image from a low-quality one, such as a downscaled, noisy or compressed image. At the time, the paper says, the leading restoration methods were based on convolutional neural networks and few attempts had been made with Transformers.

The network has three parts: shallow feature extraction, deep feature extraction and high-quality image reconstruction. A convolution layer extracts the shallow feature, which goes directly to the reconstruction module to preserve low-frequency information. The deep part is a stack of residual Swin Transformer blocks (RSTB), each with several Swin Transformer layers, a convolution layer at the end and a residual connection. For super-resolution, the reconstruction module upsamples the feature with a sub-pixel convolution layer.

For classical image super-resolution, the task in this model's name, the paper generally sets the RSTB number, layers per block, window size, channel number and attention head number to 6, 6, 8, 180 and 6. That setting is trained with only an L1 pixel loss. The paper reports that SwinIR trained on DIV2K achieved the best performance on almost all five benchmark datasets for all scale factors among the methods it compared, with a maximum PSNR gain of 0.26dB on Manga109 for scale factor 4. It also reports 11.8M parameters for SwinIR, against 115.5M for IPT, another Transformer-based model.

Key idea. SwinIR applies the Swin Transformer to image restoration, placing residual Swin Transformer blocks between a convolutional shallow feature extractor and a reconstruction module.

  • swinir
  • swinir classical sr x3
  • swinir_classical_sr_x3
  • swinir x3
  • classical image super-resolution
  • image super-resolution
  • image restoration
  • transformer super-resolution
  • rstb
  • residual swin transformer block

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