计算机工程与应用 ›› 2025, Vol. 61 ›› Issue (16): 234-244.DOI: 10.3778/j.issn.1002-8331.2405-0247

• 图形图像处理 • 上一篇    下一篇

多输入多输出约束对抗网络的图像修复算法

陈晓雷,杨佳,郑芷薇   

  1. 兰州理工大学 电气工程与信息工程学院,兰州 730050
  • 出版日期:2025-08-15 发布日期:2025-08-15

Multi-Input Multi-Output Constrained Adversarial Network Algorithm for Image Inpainting

CHEN Xiaolei, YANG Jia, ZHENG Zhiwei   

  1. College of Electrical and Information Engineering, Lanzhou University of Technology, Lanzhou 730050, China
  • Online:2025-08-15 Published:2025-08-15

摘要: 现有图像修复方法均采用单一分辨率图像作为网络输入进行图像特征提取,无法充分利用不同分辨率图像的不同特征来进行图像修复,导致图像纹理细节信息修复不佳甚至出现伪影。为进一步提高修复效果,提出一种基于多输入多输出约束对抗网络的图像修复算法。该方法设计了一种多输入低分辨率图像生成模块,利用编码解码结构生成多个低分辨率输入图像的全局结构信息;构建了一种残差注意力特征融合模块,并将低分辨率图像生成结果与高分辨率输入缺失图像包含的细粒度特征进行融合,从而帮助高分辨率图像进行补全;提出了一种约束多输出多尺度对抗损失函数,该函数通过约束生成图像的局部细节和修复图像在高级结构上的一致性,从而保证了判别器生成的多输出图像在不同尺度上的质量和真实性。在CelebA-HQ数据集和Paris Street View数据集上进行了主客观对比实验,实验结果表明,该方法性能优于当前五种代表性单输入单输出图像修复网络。多输入多输出约束对抗网络能够充分利用不同分辨率输入图像的不同特征来进行图像修复,生成更可信的图像局部细节,提高图像修复效果。

关键词: 图像修复, 约束对抗网络, 图像分辨率, 注意力机制

Abstract: Current image inpainting methods typically employ a single-resolution image as input for feature extraction, which limits the utilization of diverse features from different resolutions, resulting in suboptimal restoration of texture details and even artifacts. To enhance the inpainting performance, this paper proposes a multi-input multi-output constrained adversarial network for image inpainting. A multi-input low-resolution image generation module is designed. This module employs an encoder-decoder structure to generate global structural information from multiple low-resolution input images. A residual attention feature fusion module is constructed to merge the global features of low-resolution images with the fine-grained features of high-resolution input image, aiding in the completion of the high-resolution image. A constrained multi-output multi-scale adversarial loss function is proposed. This function ensures the consistency of the generated images in terms of local details and high-level structures, thereby guaranteeing the quality and authenticity of the multi-output images produced by the discriminator. Comparative experiments are conducted on the CelebA-HQ and Paris Street View datasets. The experimental results demonstrate that the proposed method outperforms five representative single-input single-output image inpainting networks both subjectively and objectively. The multi-input multi-output constrained adversarial network effectively leverages the distinct features from different resolution input images for image inpainting, generating more credible local details and improving the overall image inpainting performance.

Key words: image inpainting, constrained adversarial network, image resolution, attention mechanism