西安电子科技大学学报 ›› 2022, Vol. 49 ›› Issue (1): 216-224.doi: 10.19665/j.issn1001-2400.2022.01.023

• 计算机科学与技术&人工智能 • 上一篇    下一篇

一种门控卷积生成对抗网络的图像修复算法

高杰1(),霍智勇2()   

  1. 1.南京邮电大学 通信与信息工程学院,江苏 南京210003
    2.南京邮电大学 教育科学与技术学院,江苏 南京210003
  • 收稿日期:2020-10-23 出版日期:2022-02-20 发布日期:2022-04-27
  • 通讯作者: 霍智勇
  • 作者简介:高杰(1996—),男,南京邮电大学硕士研究生,E-mail: 1218012404@njupt.edu.cn
  • 基金资助:
    国家自然科学基金(61471201);江苏省自然科学基金青年基金(BK20130867)

Algorithmfor image inpainting in generative adversarial networks based on gated convolution

GAO Jie1(),HUO Zhiyong2()   

  1. 1. School of Communication and Information Engineering,Nanjing University of Posts and Telecommunications,Nanjing 210003,China
    2. School of Educational Science and Technology,Nanjing University of Posts and Telecommunications,Nanjing 210003,China
  • Received:2020-10-23 Online:2022-02-20 Published:2022-04-27
  • Contact: Zhiyong HUO

摘要:

生成对抗网络图像修复算法在填充任意掩码区域时会经常出现错误,原因是其在进行卷积运算时将所有输入像素都视为有效像素。针对该问题,提出一种门控卷积生成对抗网络的图像修复算法,利用门控卷积替换网络残差块中的传统卷积,以有效地学习已知区域与掩码区域之间的关系。算法采用边缘修复加纹理修复的两阶段生成对抗修复网络。首先,用边缘检测算法检测出破损图像中已知区域的结构;然后,将掩码区域的边缘与已知区域的颜色和纹理信息结合起来进行结构修复,再将完整结构与待修复图像一起送入纹理修复网络中进行纹理修复;最终输出得到完整图像。在网络训练过程中,采用谱归一化马尔科夫判别器以改善迭代过程中权重变化缓慢的问题,从而加快收敛速度、提升模型精度。在Places2数据集上的实验结果表明,所提出的算法在修复破损区域形状不一、大小不一的图像时,相较于之前的两阶段修复算法,在峰值信噪比和结构相似性上分别提高了3.8%和3.0%,且主观视觉效果提升明显。

关键词: 图像修复, 门控卷积, 深度学习, 生成对抗网络

Abstract:

The inpainting algorithm for the generative adversarial networks often has the errors when filling arbitrary masked areas,because the convolution operation treats all input pixels as valid pixels.In order to solve this problem,an image inpainting algorithm based on gated convolution is proposed,which uses gated convolution to replace the traditional convolution in the residual block of the network to effectively learn the relationship between the known areas and the masked areas.The algorithm uses a two-stage generation of an adversarial inpainting network with edge repair and texture repair.First,we use the edge detection algorithm to detect the structure of the known area in the damaged image.Next,we combine the edge in the mask area with the color and texture information on the known area to repair the structure.Then,the complete structure is combined with the damaged image and sent to the texture repair network for texture repair.Finally,the complete image is output.In the process of network training,the Spectral Normalized Markovian Discriminator is used to improve the problem of slow weight change in the iterative process,thereby speeding up the convergence speed and improving the accuracy of the model.Experimental results on the Places2 dataset show that the proposed algorithm is different in peak signal-to-noise ratio (PSNR) and structural similarity (SSIM) compared with the previous two-stage inpainting algorithm when repairing images with different shapes and sizes in damaged areas.The peak signal-to-noise ratio and structural similarity are improved by 3.8% and 3% respectively,and the subjective visual effect is significantly improved.

Key words: image inpainting, gated convolution, deep learning, generative adversarial network

中图分类号: 

  • TP391