Recently, Transformer architecture has been introduced into image restoration to replace convolution neural network (CNN) with surprising results. Considering the high computational complexity of Transformer with global attention, some methods use the local square window to limit the scope of self-attention. However, these methods lack direct interaction among different windows, which limits the establishment of long-range dependencies. To address the above issue, we propose a new image restoration model, Cross Aggregation Transformer (CAT). The core of our CAT is the Rectangle-Window Self-Attention (Rwin-SA), which utilizes horizontal and vertical rectangle window attention in different heads parallelly to expand the attention area and aggregate the features cross different windows. We also introduce the Axial-Shift operation for different window interactions. Furthermore, we propose the Locality Complementary Module to complement the self-attention mechanism, which incorporates the inductive bias of CNN (e.g., translation invariance and locality) into Transformer, enabling global-local coupling. Extensive experiments demonstrate that our CAT outperforms recent state-of-the-art methods on several image restoration applications. The code and models are available at https://github.com/zhengchen1999/CAT.
翻译:最近,变形金刚模型(Transformer)架构已经被引入到图像恢复中,以替代卷积神经网络(CNN),并取得了出色的效果。考虑到全局注意力使变形金刚的计算复杂度很高,因此一些方法使用本地方形窗口来限制自注意的范围。然而,这些方法缺乏不同窗口之间的直接交互,这限制了建立长程依赖关系的能力。为了解决上述问题,本文提出了一种新的图像恢复模型,即交叉聚合变形金刚(Cross Aggregation Transformer, CAT)。CAT的核心是矩形窗口自注意模块(Rwin-SA),它使用不同的水平和垂直的矩形窗口注意力层平行地扩大了注意力范围并在不同窗口之间进行特征聚合。还介绍了轴向位移操作来处理不同窗口之间的交互。此外,我们提出了局部补充模块来补充自注意机制,其中包括CNN的归纳偏差(例如平移不变性和局部性)进入变形金刚模型,从而实现全局与局部的耦合。广泛的实验表明,CAT在几个图像恢复应用中优于最近的最先进方法。代码和模型可在https://github.com/zhengchen1999/CAT获得。