计算机工程与应用 ›› 2021, Vol. 57 ›› Issue (12): 211-215.DOI: 10.3778/j.issn.1002-8331.2004-0052

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

多区域差异化的图像风格迁移算法

王杨,郁振鑫,卢嘉,向秀梅   

  1. 1.河北工业大学 电子信息工程学院,天津 300401
    2.河北工业大学 天津市电子材料与器件重点实验室,天津 300401
  • 出版日期:2021-06-15 发布日期:2021-06-10

Multi-region Differential Image Style Transfer Algorithm

WANG Yang, YU Zhenxin, LU Jia, XIANG Xiumei   

  1. 1.College of Electronics and Information Engineering, Hebei University of Technology, Tianjin 300401, China
    2.Tianjin Key Laboratory of Electronic Materials & Devices, Hebei University of Technology, Tianjin 300401, China
  • Online:2021-06-15 Published:2021-06-10

摘要:

图像风格迁移技术可以自动地赋予图像不同的风格。现有的研究大多针对图像的整体或者图像中的单一区域进行风格迁移,在实际应用中难免存在局限性。在风格迁移过程中引入内容图像的语义信息,提出一种针对图像不同区域进行的差异风格化的方法。将内容图像经过语义分割后引入VGG损失网络,从而限定图像的风格化区域。分别在每个区域上计算各自的格拉姆矩阵,并在反向传播阶段将梯度传播限定在各语义区域上,得出针对图像不同区域的风格特征值。将正则化损失引入损失函数中,以减弱不同区域间的相互影响。在Microsoft COCO2017数据集上设计了实验,结果表明,该方法实现图像多个区域不同风格化的同时,保证了区域之间过渡自然。

关键词: 风格迁移, 卷积神经网络, 语义分割, 区域差异

Abstract:

Image style transfer techniques always can be used to automatically endow different styles to an image based on a given style image. Only the whole image or a single area in the image used to be stylized through the existing image style transfer method, which inevitable results in limitations in practical applications. By introducing the semantic information of the content image in the style conversion process, the different semantic regions of the image can be stylized differently. The content image is semantically segmented and introduced into the VGG loss network to define the stylized region of the image. The Gram matrices are respectively calculated on each of the regions, and gradient propagation is limited to each semantic region in the back-propagation stage to obtain the style feature values for different regions of the image. The regularization loss is introduced into the loss function, which aims to reduce the interaction between different regions. Experiments are designed on the Microsoft COCO2017 dataset, and the results show that the method has achieved different stylization of multiple regions of the image while ensuring the natural transition between regions.

Key words: style transfer, convolutional neural network, semantic segmentation, regional differences