KNN Local Attention for Image Restoration
Hunsang Lee, Hyesong Choi, Kwanghoon Sohn, Dongbo Min
Abstract
Recent works attempt to integrate the non-local operation with CNNs or Transformer, achieving remarkable performance in image restoration tasks. The global similarity, however, has the problems of the lack of locality and the high computational complexity that is quadratic to an input resolution. The local attention mechanism alleviates these issues by introducing the inductive bias of the locality with convolution-like operators. However, by focusing only on adjacent positions, the local attention suffers from an insufficient receptive field for image restoration. In this paper, we propose a new attention mechanism for image restoration, called k-NN Image Transformer (KiT), that rectifies the above mentioned limitations. Specifically, the KiT groups k-nearest neighbor patches with locality sensitive hashing (LSH), and the grouped patches are aggregated into each query patch by performing a pair-wise local attention. In this way, the pair-wise operation establishes nonlocal connectivity while maintaining the desired properties of the local attention, i.e., inductive bias of locality and linear complexity to input resolution. The proposed method outperforms state-of-the-art restoration approaches on image denoising, deblurring and deraining benchmarks. The code will be available soon.
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.
Cited by top-tier papers9
- ESSAformer: Efficient Transformer for Hyperspectral Image Super-resolutionMingjin Zhang, Chi Zhang, Qiming Zhang, Jie Guo et al.ICCV 2023 · 73 citations
- Dual-Domain Attention for Image DeblurringYuning Cui, Yi Tao, Wenqi Ren, Alois KnollAAAI 2023 · 68 citations
- Xformer: Hybrid X-Shaped Transformer for Image DenoisingJiale Zhang, Yulun Zhang, Jinjin Gu, Jiahua Dong et al.ICLR 2024 · 59 citations
- Sharing Key Semantics in Transformer Makes Efficient Image RestorationBin Ren, Yawei Li, Jingyun Liang, Rakesh Ranjan et al.NeurIPS 2024 · 17 citations
- High Visual-Fidelity Learned Video CompressionMeng Li, Yibo Shi, Jing Wang, Yunqi HuangACM MM 2023 · 10 citations
Builds on24
- 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
- SegFormer: Simple and Efficient Design for Semantic Segmentation with TransformersEnze Xie, Wenhai Wang, Zhiding Yu, Anima Anandkumar et al.NeurIPS 2021 · 9,661 citations
- Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without ConvolutionsWenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan et al.ICCV 2021 · 4,909 citations
- Reformer: The Efficient TransformerNikita Kitaev, Lukasz Kaiser, Anselm LevskayaICLR 2020 · 2,878 citations
Related papers
- Cross Aggregation Transformer for Image RestorationZheng Chen, Yulun Zhang, Jinjin Gu, Yongbing Zhang et al.NeurIPS 2022 · 274 citations
- Random Shuffle Transformer for Image RestorationJie Xiao, Xueyang Fu, Man Zhou, Hongjian Liu et al.ICML 2023 · 38 citations
- Stochastic Window Transformer for Image RestorationJie Xiao, Xueyang Fu, Feng Wu, Zheng-Jun ZhaNeurIPS 2022 · 37 citations
- CLG-INet: Coupled Local-Global Interactive Network for Image RestorationYuqi Jiang, Chune Zhang, Shuo Jin, Jiao Liu et al.ACM MM 2023 · 4 citations
- T-former: An Efficient Transformer for Image InpaintingYe Deng, Siqi Hui, Sanping Zhou, Deyu Meng et al.ACM MM 2022 · 58 citations
