Journal of Frontiers of Computer Science and Technology ›› 2025, Vol. 19 ›› Issue (8): 2149-2160.DOI: 10.3778/j.issn.1673-9418.2409004

• Graphics·Image • Previous Articles     Next Articles

Image Inpainting Guided by Image Smoothness Structure

SHI Jiliang, ZHANG Qian, YANG Sihong, LIU Shuang, TENG Lin, BAI Wuer   

  1. 1. School of Data Science and Information Engineering, Guizhou Minzu University, Guiyang 550025, China
    2. Key Laboratory of Pattern Recognition and Intelligent System, Guiyang 550025, China
    3. Academic Affairs Office, Guizhou Minzu University, Guiyang 550025, China
  • Online:2025-08-01 Published:2025-07-31

图像平滑结构引导的图像修复

石计亮,张乾,杨思红,刘霜,滕林,柏武贰   

  1. 1. 贵州民族大学 数据科学与信息工程学院,贵阳 550025
    2. 贵州省模式识别与智能系统重点实验室,贵阳 550025
    3. 贵州民族大学 教务处,贵阳 550025

Abstract: To address the existing challenges in image inpainting methods, such as large parameter count, high computational complexity, and the issue of structural blurring or distortion in the restoration of severely damaged images, a lightweight image inpainting method guided by image smoothing structures is proposed. This method primarily comprises a structure reconstruction network, a structure enhancement network, and a texture restoration network. Firstly, the structure reconstruction network restores the damaged, edge-preserving smooth image to generate a rough smooth image. Then, the structure enhancement network further refines this smooth image, enhancing its coherence and providing reliable structural guidance for RGB image restoration. Finally, the texture restoration network utilizes the enhanced structural information to regulate the restoration process and reconstruct the damaged RGB image. In the encoding stage, to avoid the loss of structural information at different scales, an auxiliary feature aggregation module is used to fuse multi-scale structural information into the inpainting process. In the decoding stage, a feature synthesis module is employed to model both local and global contexts of the input feature maps, ensuring clearer textures and semantic structures in the missing regions of the image. This approach results in a more reasonable and coherent restoration. Additionally, contrast loss based on contrastive learning is introduced to stabilize and improve the model??s training performance. Experiments conducted on the CelebA-HQ, FFHQ, Paris StreetView, and Dunhuang datasets demonstrate that the proposed method outperforms existing methods in terms of restoration quality, with a parameter count of 9×106 and computational complexity of 29 GFLOPs.

Key words: image inpainting, auxiliary structures, attention mechanism, contrastive learning

摘要: 针对现有图像修复方法存在参数量大、计算复杂度高以及大面积受损图像修复产生结构模糊或扭曲问题,提出一种图像平滑结构引导的轻量级图像修复方法。该方法由结构重建网络、结构增强网络和纹理修复网络组成。结构重建网络重建受损的边缘保留平滑图像,生成粗糙的平滑图像。结构增强网络进一步精细化该平滑图像,增强其连贯性,为RGB图像修复提供可靠的辅助结构信息。纹理修复网络利用增强后的结构信息调节修复过程,以重建受损的RGB图像。在编码阶段,为避免不同尺度的结构信息丢失,使用辅助特征聚合模块将多尺度结构信息融合到修复过程。在解码阶段,为了在图像缺失区域合成清晰的纹理和语义结构,使用特征合成模块对输入特征图建模局部和全局上下文,从而得到更合理的修复效果。此外,引入基于对比学习的对比损失以稳定和改进模型的训练效果。在CelebA-HQ、FFHQ、Paris StreetView以及Dunhuang数据集上进行实验,实验结果表明,该方法在参数量为9×106、计算复杂度为29 GFLOPs的情况下,修复效果均优于对比方法。

关键词: 图像修复, 辅助结构, 注意力机制, 对比学习