arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2405.20008cs.CV

共享Transformer中的关键语义实现高效图像恢复

Sharing Key Semantics in Transformer Makes Efficient Image Restoration

ETH Zürich(苏黎世联邦理工学院);INSAIT, Sofia University(保加利亚索菲亚大学INSAIT研究院);University of Pisa(比萨大学);University of Trento(特伦托大学);Meta Reality Labs(元宇宙现实实验室);Peking University(北京大学);University of Modena and Reggio Emilia(摩德纳-雷焦艾米利亚大学);University of California, Merced(加州大学默塞德分校)

Bin Ren, Yawei Li, Jingyun Liang, Rakesh Ranjan, Mengyuan Liu, Rita Cucchiara, Luc Van Gool, Ming-Hsuan Yang, Nicu Sebe

AI总结:

本文提出SemanIR,通过构建并共享关键语义字典,使Transformer在图像恢复中仅关注语义相关组件,实现线性复杂度注意力计算,在6项任务上达到最先进性能。

摘要:

图像恢复(IR)作为经典的底层视觉任务,通过有效建模全局信息的深度模型已取得显著进展。值得注意的是,视觉Transformer(ViTs)的出现进一步推动了这些进展。在计算过程中,自注意力机制作为ViTs的基石,倾向于涵盖所有全局线索,甚至包括来自语义无关对象或区域的线索。这种包容性引入了计算低效,尤其在高输入分辨率下尤为明显,因为它需要处理无关信息,从而阻碍了效率。此外,对于IR,通常注意到退化图像的小片段,尤其是那些在语义上紧密对齐的部分,为恢复过程提供了特别相关的信息,因为它们贡献了对于准确重建至关重要的上下文线索。为解决这些挑战,本文提出通过共享Transformer中的关键语义来提升IR性能(即SemanIR)。具体而言,SemanIR首先在每个Transformer阶段内通过为每个退化补丁建立必要的语义连接,构建一个稀疏但全面的关键语义字典。随后,该字典在同一阶段内的所有后续Transformer块中共享。该策略通过仅关注关键语义字典中存储的语义相关组件,优化了每个块内的注意力计算。因此,注意力计算在每个窗口内实现了线性计算复杂度。在6项IR任务上的大量实验证实了所提出的SemanIR的最先进性能,定量和定性展示了进展。视觉结果、代码和训练模型可在https://github.com/Amazingren/SemanIR获取。

英文摘要:

Image Restoration (IR), a classic low-level vision task, has witnessed significant advancements through deep models that effectively model global information. Notably, the emergence of Vision Transformers (ViTs) has further propelled these advancements. When computing, the self-attention mechanism, a cornerstone of ViTs, tends to encompass all global cues, even those from semantically unrelated objects or regions. This inclusivity introduces computational inefficiencies, particularly noticeable with high input resolution, as it requires processing irrelevant information, thereby impeding efficiency. Additionally, for IR, it is commonly noted that small segments of a degraded image, particularly those closely aligned semantically, provide particularly relevant information to aid in the restoration process, as they contribute essential contextual cues crucial for accurate reconstruction. To address these challenges, we propose boosting IR's performance by sharing the key semantics via Transformer for IR (\ie, SemanIR) in this paper. Specifically, SemanIR initially constructs a sparse yet comprehensive key-semantic dictionary within each transformer stage by establishing essential semantic connections for every degraded patch. Subsequently, this dictionary is shared across all subsequent transformer blocks within the same stage. This strategy optimizes attention calculation within each block by focusing exclusively on semantically related components stored in the key-semantic dictionary. As a result, attention calculation achieves linear computational complexity within each window. Extensive experiments across 6 IR tasks confirm the proposed SemanIR's state-of-the-art performance, quantitatively and qualitatively showcasing advancements. The visual results, code, and trained models are available at https://github.com/Amazingren/SemanIR.

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

↑