arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2409.06206cs.CV
收藏

AgileIR:面向敏捷图像恢复的内存高效分组移位窗口注意力

AgileIR: Memory-Efficient Group Shifted Windows Attention for Agile Image Restoration

Faculty of Computer Science;Information Technology University of Malaya Kuala Lumpur, Malaysia;School of Intelligence Science;Technology University of Science;Faculty of Art;Design Fuzhou University of International Studies

Hongyi Cai, Mohammad Mahdinur Rahman, Mohammad Shahid Akhtar, Jie Li, Jingyu Wu, Zhili Fang

AI总结:

针对SwinIR图像恢复内存占用高的问题,本文提出AgileIR及GSWA,通过跨注意力头分组、保留移位掩码与重分配投影参数,在Set5保持32.20 dB并节省逾50%内存。

摘要:

Image Transformers在图像恢复任务中取得了巨大成功。然而,大多数基于Transformer的模型都受到过高内存占用的严格限制。我们的目标是降低Swin Transformer的内存消耗,同时在训练过程中加快模型速度。因此,我们提出了AgileIR,这是一种与窗口注意力相结合的分组移位注意力机制,从架构上对模型进行稀疏化简化。我们提出分组移位窗口注意力(GSWA),将移位窗口多头自注意力(SW-MSA)和窗口多头自注意力(W-MSA)沿其注意力头分解为多个组,从而有助于减少反向传播中的内存使用。除此之外,我们在训练期间保留移位窗口掩码及其移位可学习偏置,以引导模型在通道内跨窗口交互。我们还重新分配投影参数以加速注意力矩阵计算,并发现这只会带来可忽略的性能下降。实验结果表明,与我们的基线SwinIR及其他高效量化模型相比,AgileIR在Set5评估数据集上仍保持32.20 dB的性能,超过了其他采用定制高效方法的方法,并在使用较大批量大小时节省超过50%的内存。

英文摘要:

Image Transformers show a magnificent success in Image Restoration tasks. Nevertheless, most of transformer-based models are strictly bounded by exorbitant memory occupancy. Our goal is to reduce the memory consumption of Swin Transformer and at the same time speed up the model during training process. Thus, we introduce AgileIR, group shifted attention mechanism along with window attention, which sparsely simplifies the model in architecture. We propose Group Shifted Window Attention (GSWA) to decompose Shift Window Multi-head Self Attention (SW-MSA) and Window Multi-head Self Attention (W-MSA) into groups across their attention heads, contributing to shrinking memory usage in back propagation. In addition to that, we keep shifted window masking and its shifted learnable biases during training, in order to induce the model interacting across windows within the channel. We also re-allocate projection parameters to accelerate attention matrix calculation, which we found a negligible decrease in performance. As a result of experiment, compared with our baseline SwinIR and other efficient quantization models, AgileIR keeps the performance still at 32.20 dB on Set5 evaluation dataset, exceeding other methods with tailor-made efficient methods and saves over 50% memory while a large batch size is employed.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑