Swin Transformer descends from classification to pixel scrubbing
SwinIR applies the Swin Transformer—best known for high-level vision tasks like classification—to the unglamorous but stubborn problems of super-resolution, denoising, and JPEG artifact removal.

What it does SwinIR is the official PyTorch implementation of an image restoration model built on the Swin Transformer. It takes low-quality images—downscaled, noisy, or heavily compressed—and reconstructs cleaner, higher-resolution versions. The authors report state-of-the-art results across classical and real-world super-resolution, plus grayscale and color denoising and JPEG artifact reduction.
The interesting bit
Low-level vision has been ruled by convolutional neural networks for years. SwinIR replaces that stack with residual Swin Transformer blocks (RSTB), using shifted-window attention to extract deep features. The authors claim this design outperforms prior methods by up to 0.14–0.45dB while reducing total parameters by as much as 67%.
Key highlights
- Covers three restoration tasks: image super-resolution (classical, lightweight, and real-world variants), image denoising, and JPEG compression artifact reduction
- Architecture chains shallow feature extraction, deep residual Swin Transformer blocks, and a reconstruction head
- Ships with pretrained models, a Colab notebook, a Gradio web demo, and a PlayTorch mobile demo
- ETH Zurich authors provide visual comparisons against BSRGAN and Real-ESRGAN in the README
Verdict A solid starting point if you want to experiment with transformer-based restoration instead of defaulting to a CNN baseline. Probably overkill if you just need a quick, untuned upscaler for a production pipeline.
Frequently asked
- What is JingyunLiang/SwinIR?
- SwinIR applies the Swin Transformer—best known for high-level vision tasks like classification—to the unglamorous but stubborn problems of super-resolution, denoising, and JPEG artifact removal.
- Is SwinIR open source?
- Yes — JingyunLiang/SwinIR is open source, released under the Apache-2.0 license.
- What language is SwinIR written in?
- JingyunLiang/SwinIR is primarily written in Python.
- How popular is SwinIR?
- JingyunLiang/SwinIR has 5.6k stars on GitHub.
- Where can I find SwinIR?
- JingyunLiang/SwinIR is on GitHub at https://github.com/JingyunLiang/SwinIR.