Skip to main content
QUICK REVIEW

[论文解读] Incremental Transformer Structure Enhanced Image Inpainting with Masking Positional Encoding

Qiaole Dong, Chenjie Cao|arXiv (Cornell University)|Mar 2, 2022
Generative Adversarial Networks and Image Synthesis被引用 14
一句话总结

本文提出了一种基于增量Transformer的图像修复框架ZITS,通过Transformer结构恢复器学习归一化的灰度草图空间,并结合零初始化残差连接(ZeroRA)与预训练模型,从而提升结构恢复效果。一种新颖的掩码位置编码(MPE)在大范围不规则掩码上表现更优,使该方法在1024×1024图像上实现了SOTA性能,相比LaMa等SOTA方法,具有更优的结构保持能力与更低的模糊度。

ABSTRACT

Image inpainting has made significant advances in recent years. However, it is still challenging to recover corrupted images with both vivid textures and reasonable structures. Some specific methods only tackle regular textures while losing holistic structures due to the limited receptive fields of convolutional neural networks (CNNs). On the other hand, attention-based models can learn better long-range dependency for the structure recovery, but they are limited by the heavy computation for inference with large image sizes. To address these issues, we propose to leverage an additional structure restorer to facilitate the image inpainting incrementally. The proposed model restores holistic image structures with a powerful attention-based transformer model in a fixed low-resolution sketch space. Such a grayscale space is easy to be upsampled to larger scales to convey correct structural information. Our structure restorer can be integrated with other pretrained inpainting models efficiently with the zero-initialized residual addition. Furthermore, a masking positional encoding strategy is utilized to improve the performance with large irregular masks. Extensive experiments on various datasets validate the efficacy of our model compared with other competitors. Our codes are released in https://github.com/DQiaole/ZITS_inpainting.

研究动机与目标

  • 解决在大范围不规则掩码下恢复高分辨率图像中逼真纹理与整体结构的挑战。
  • 克服CNN在捕捉长距离依赖关系方面的局限性,以及全尺度Transformer在图像修复中带来的高计算成本。
  • 通过在掩码区域中引入显式位置信息,提升在弱纹理与复杂结构场景下的性能。
  • 实现在不进行完整微调的前提下,高效集成结构先验信息到预训练图像修复模型中。

提出的方法

  • 一种带有交替轴向注意力与标准注意力模块的Transformer结构恢复器(TSR),在从边缘与线条提取的低分辨率灰度草图空间中学习整体结构。
  • 通过四层CNN对草图空间进行上采样,以在更高分辨率下保留结构细节。
  • 一种结构特征编码器(SFE)结合门控卷积,利用零初始化残差连接(ZeroRA)将结构特征融合进基于快速傅里叶卷积(FFC)的图像修复模型中。
  • 一种新颖的掩码位置编码(MPE)同时编码从非掩码区域到掩码区域的距离与方向,提升大范围不规则掩码下的重建保真度。
  • 该框架支持增量训练,实现快速收敛与预训练模型的高效适应。
  • 该方法端到端训练,可直接应用于高分辨率图像(最高达2048×2048),无需重新训练。
Figure 1 : High quality 1024 $\times$ 1024 inpainted results. From left to right, masked inputs, results of LaMa [ 45 ] , results of our method.
Figure 1 : High quality 1024 $\times$ 1024 inpainted results. From left to right, masked inputs, results of LaMa [ 45 ] , results of our method.

实验结果

研究问题

  • RQ1一种轻量化、增量式的基于Transformer的结构恢复器是否能在不微调主模型的前提下,提升图像修复中的整体结构恢复能力?
  • RQ2与标准位置编码相比,掩码位置编码(MPE)在大范围不规则掩码上的性能提升机制是什么?
  • RQ3从边缘与线稿中提取的归一化灰度草图空间是否能有效引导高分辨率结构重建?
  • RQ4基于ZeroRA的集成策略是否能实现比完整微调更快的收敛速度与更优的性能?

主要发现

  • 在1k Places(512)数据集上使用40%中心矩形掩码时,所提方法在PSNR为19.65、FID为55.85、LPIPS为0.239的情况下,FID与LPIPS优于Co-Mod与LaMa,PSNR表现相当。
  • 在1024×1024 MatterPort3D图像上,该方法在弱纹理与复杂几何结构场景中生成的结果比LaMa更一致且结构更准确。
  • 在Indoor与Places2数据集的用户研究中,该方法在72.3%与74.1%的比较中被志愿者评为最佳,显著优于LaMa。
  • 在512×512具有强周期性纹理的图像上,该方法实现了具有竞争力的PSNR(25.67)与FID(11.67),FID与LPIPS略优于LaMa。
  • 在2048×2048图像上,该方法相比LaMa保持了更一致的结构并减少了模糊,展现出对超高分辨率图像的可扩展性。
  • 在复杂城市景观的远距离视图中,该方法表现失败,原因在于草图空间分辨率有限(256×256),表明其在捕捉远距离结构细节方面存在局限。
Figure 2 : The overview of our ZITS. At first, the TSR model is used to restore structures with low resolutions. Then the simple CNN based upsampler is leveraged to upsample edge and line maps. Moreover, the upsampled sketch space is encoded by the SFE model, and added to the FTR through ZeroRA to r
Figure 2 : The overview of our ZITS. At first, the TSR model is used to restore structures with low resolutions. Then the simple CNN based upsampler is leveraged to upsample edge and line maps. Moreover, the upsampled sketch space is encoded by the SFE model, and added to the FTR through ZeroRA to r

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。