计算机工程与应用 ›› 2020, Vol. 56 ›› Issue (2): 176-183.DOI: 10.3778/j.issn.1002-8331.1907-0060

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

深度卷积神经网络下的图像风格迁移算法

李慧,万晓霞   

  1. 武汉大学 印刷与包装系,武汉 430079
  • 出版日期:2020-01-15 发布日期:2020-01-14

Image Style Transfer Algorithm Under Deep Convolutional Neural Network

LI Hui, WAN Xiaoxia   

  1. School of Printing and Packaging, Wuhan University, Wuhan 430079, China
  • Online:2020-01-15 Published:2020-01-14

摘要: 针对图像风格迁移中出现的图像扭曲、内容细节丢失的问题,提出一种基于深度卷积神经网络的带有语义分割的图像风格迁移算法。定义内容图像损失和风格图像损失函数;对内容图像与风格图像分别进行语义分割,并将Matting算法作用在内容图像上,使用最小二乘惩罚函数来增强图片边缘真实性;进行图像的内容重建和风格重建生成新的图像。分析比较Neural Style改进方法、CNNMRF方法和带有语义分割的图像风格迁移方法生成的图像。实验结果和质量评估表明,70%带有语义分割的图像风格迁移方法生成的图像没有明显的图像扭曲,且内容细节完好。所以,该方法可以解决图像扭曲和细节丢失的问题,使内容丰富的图像可以得到精确的风格迁移。

关键词: 深度卷积神经网络, 图像风格迁移, 语义分割, Matting算法

Abstract: Aiming at the problem of image transfer and loss of content details in image style transfer, an image style transfer algorithm with semantic segmentation based on deep convolutional neural network is proposed. Firstly, the content image loss and the style image loss function are defined. Then the content image and the style image are separately semantically segmented, and the Matting algorithm is applied to the content image, and the least squares penalty function is used to enhance the image edge authenticity. The content reconstruction and style reconstruction generate new images. It analyzes and compares the images generated by the Neural Style modified method, CNNMRF method and the image style transfer method with semantic segmentation. The experimental results and quality evaluation show that 70% of the images generated by the image style transfer method with semantic segmentation have no obvious image distortion and the content details are intact. Therefore, this method can solve the problem of image distortion and detail loss, so that the rich image can be accurately styled.

Key words: deep convolutional neural network, image style transfer, semantic segmentation, Matting algorithm