N-Gram in Swin Transformers for Efficient Lightweight Image Super-Resolution
Haram Choi, Jeongmin Lee, Jihoon Yang
Abstract
While some studies have proven that Swin Transformer (Swin) with window self-attention (WSA) is suitable for single image super-resolution (SR), the plain WSA ignores the broad regions when reconstructing high-resolution images due to a limited receptive field. In addition, many deep learning SR methods suffer from intensive computations. To address these problems, we introduce the N-Gram context to the low-level vision with Transformers for the first time. We define N-Gram as neighboring local windows in Swin, which differs from text analysis that views N-Gram as consecutive characters or words. N-Grams interact with each other by sliding-WSA, expanding the regions seen to restore degraded pixels. Using the N-Gram context, we propose NGswin, an efficient SR network with SCDP bottleneck taking multi-scale outputs of the hierarchical encoder. Experimental results show that NGswin achieves competitive performance while maintaining an efficient structure when compared with previous leading methods. Moreover, we also improve other Swin-based SR methods with the N-Gram context, thereby building an enhanced model: SwinIR-NG. Our improved SwinIR-NG outperforms the current best lightweight SR approaches and establishes state-of-the-art results. Codes are available at https://github.com/rami0205/NGramSwin .
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 0bc98ba1-9505-4245-a4df-c98b8c176a93Cited by top-tier papers16
- Transcending the Limit of Local Window: Advanced Super-Resolution Transformer with Adaptive Token DictionaryLeheng Zhang, Yawei Li, Xingyu Zhou, Xiaorui Zhao et al.CVPR 2024 · 73 citations
- CAMixerSR: Only Details Need More "Attention"Yan Wang, Yi Liu, Shijie Zhao, Junlin Li et al.CVPR 2024 · 60 citations
- See More Details: Efficient Image Super-Resolution by Experts MiningEduard Zamfir, Zongwei Wu, Nancy Mehta, Yulun Zhang et al.ICML 2024 · 38 citations
- Image Processing GNN: Breaking Rigidity in Super-ResolutionYuchuan Tian, Hanting Chen, Chao Xu, Yunhe WangCVPR 2024 · 34 citations
- Spiking Meets Attention: Efficient Remote Sensing Image Super-Resolution with Attention Spiking Neural NetworksYi Xiao, Qiangqiang Yuan, Kui Jiang, Wenke Huang et al.NeurIPS 2025 · 25 citations
Builds on13
- Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu et al.ICCV 2021 · 31,683 citations
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- Restormer: Efficient Transformer for High-Resolution Image RestorationSyed Waqas Zamir, Aditya Arora, Salman Khan, Munawar Hayat et al.CVPR 2022 · 3,348 citations
- Swin Transformer V2: Scaling Up Capacity and ResolutionZe Liu, Han Hu, Yutong Lin, Zhuliang Yao et al.CVPR 2022 · 2,138 citations
- Uformer: A General U-Shaped Transformer for Image RestorationZhendong Wang, Xiaodong Cun, Jianmin Bao, Wengang Zhou et al.CVPR 2022 · 1,970 citations
Related papers
- SRFormer: Permuted Self-Attention for Single Image Super-ResolutionYupeng Zhou, Zhen Li, Chun-Le Guo, Song Bai et al.ICCV 2023
- GRFormer: Grouped Residual Self-Attention for Lightweight Single Image Super-ResolutionYuzhen Li, Zehang Deng, Yuxin Cao, Lihua LiuACM MM 2024 · 9 citations
- From Coarse to Fine: Hierarchical Pixel Integration for Lightweight Image Super-resolutionJie Liu, Chao Chen, Jie Tang, Gangshan WuAAAI 2023 · 26 citations
- Swin-UNIT: Transformer-based GAN for High-resolution Unpaired Image TranslationYifan Li, Yaochen Li, Wenneng Tang, Zhifeng Zhu et al.ACM MM 2023 · 13 citations
- Low-Light Image Enhancement with Illumination-Aware Gamma Correction and Complete Image Modelling NetworkYinglong Wang, Zhen Liu, Jianzhuang Liu, Songcen Xu et al.ICCV 2023 · 70 citations
