多阶段重建内容协同优化的图像修复算法
Image Inpainting Algorithm Based on Multi-Stage Reconstruction Collaborative Optimization
-
摘要: 随着数字图像技术的快速发展,图像已经成为日常生活学习中信息传递的重要载体之一。然而,由于错误传输、不当存储或者关键信息被遮挡等情况造成的图像信息丢失,往往影响人们对图像信息的理解和分析。近几年,大量渐进式图像修复算法被提出,通过由粗到精的修复方式逐步生成受损图像的缺失信息,使修复后的图像在视觉和内容上接近原始图像。然而,在这种渐进式图像修复的结构中,低渐进层的错误往往容易传递到高渐进层中,造成修复结果在图像内容上有误,难以达到人眼视觉要求。针对这一问题,本文提出了一种多阶段重建内容协同优化的图像修复算法(Image inpainting algorithm based on multi-stage reconstruction collaborative optimization,MSNet),在渐进修复中融入并行结构,通过对三阶段渐进层内容的协同优化,提高修复结果的准确性。具体来说,在该网络的初步修复阶段后,提出了一种并行的图像内容精细化修复模块(Parallel image content refinement module, PCRM),通过基于自注意力的U-Net和增强的残差网络两个分支并行地修复图像结构和细节信息。其中,基于自注意力的U-Net倾向于对图像的结构特征进行抽象提取,并通过Multi-Head自注意力机制进行全局恢复。而增强残差网络结构则通过优化特征值区分度的方式,提升重要细节信息的表征能力,使残差网络能够更关注于重要细节的恢复。在PCRM后,为了融合第二阶段所得的多个修复重建信息,细节-结构融合模块被提出来,将细节信息合理嵌入到结构中,提高多渐进层特征在空间表征上的兼容性,减少纹理与结构不统一所造成的图像视觉不连续问题,以生成更加符合客观现实的修复结果。实验结果表明,与现有的修复算法对比,本文提出的算法可以生成纹理更加清晰,视觉上更加逼真的结果。Abstract: With the rapid development of digital imaging technology, images have become some of the important carriers of information in daily life and learning. However, owing to the inevitable data transmission errors, improper storage, or obscured important information, the image information may be incomplete, which will significantly affects people’s understanding and analysis. Recently, several progressive image inpainting networks, which can restore gradually corrupted images from coarse to fine, have achieved remarkable progress. However, these progressive methods may cause error propagation from lower progressive levels to higher levels. Aiming at the limitations, this paper proposes an image inpainting algorithm based on multi-stage reconstruction collaborative optimization (MSNet) for better visual consistency and texture continuity. In MSNet, a three-stage inpainting structure is designed to collaboratively optimize progressive inpainting contents. Specifically, the first stage is for the coarse inpainting, and then the structure and details are polished in the second parallel inpainting stage. In the second stage, we propose a parallel image content refinement module (PCRM), in which the structure information and local details are independently refined by a two-branch parallel structure: self-attention based U-Net and enhanced residual branches. Here, self-attention based U-Net tends to extract the structure of image features and restore them through the multi-head attention mechanism. An enhanced residual structure adds a module for enhancing detail information by gradient optimization, which focuses on the recovery of important details and improves the discrimination of important content and background information. After PCRM, a structure-detail fusion structure is presented in the third stage of MSNet to embed details into structural information and reduce the visual discontinuity, which can fuse the multiple parallel reconstructions generated by second stage and obtain accuracy inpainting results with better spatial representation. Extensive experimental results demonstrate that the image inpainting results of proposed MSNet can obtain more accurate image restoration results with better visual quality.