巢湖学院学报 ›› 2023, Vol. 25 ›› Issue (6): 101-110+128.doi: 10.12152/j.issn.1672-2868.2023.06.013

• 信息科学 • 上一篇    下一篇

基于笔触和轮廓约束的艺术绘画图像风格迁移

施晓,胡学友:合肥学院 先进制造工程学院;黄迎辉:蚌埠学院 计算机与信息工程学院   

  1. 1. 合肥学院 先进制造工程学院,安徽 合肥 230601; 2. 蚌埠学院 计算机与信息工程学院,安徽 蚌埠 233030
  • 收稿日期:2023-10-22 出版日期:2023-11-25 发布日期:2024-05-28
  • 作者简介:施晓(1998—),男,安徽枞阳人,合肥学院先进制造工程学院硕士研究生,主要从事计算机视觉研究。
  • 基金资助:
    安徽省特色学位点(项目编号:2022tsxwd048)

Art Painting Image Style Transfer Based on Stroke and Contour Constraints

SHI Xiao,HU Xue-you:School of Advanced Manufacturing Engineering, Hefei University;HUANG Ying-hui:School of Computer Science and Information Engineering, Bengbu University   

  1. 1. School of Advanced Manufacturing Engineering, Hefei University, Hefei Anhui 230601; 2. School of Computer Science and Information Engineering, Bengbu University, Bengbu Anhui 233030
  • Received:2023-10-22 Online:2023-11-25 Published:2024-05-28

摘要: 图像风格迁移在艺术绘画领域具有重要的应用价值,现有的艺术绘画风格迁移算法无法很好的迁移特定风格作品的独特笔触和图像中对象的轮廓特征。为实现更好的风格迁移效果,提出了一种基于笔触和轮廓约束的艺术绘画图像风格迁移方法。使用预训练的边缘检测器提取风格图像和内容图像的笔触特征,设计损失函数强调二者间的笔触一致性;采用腐蚀和模糊技术模拟油画中颜料的扩散效应,对内容图像中的对象轮廓进行约束。生成网络中引入多头注意力机制聚焦关键风格特征,损失函数采用Smooth L1代替L1来提升训练稳定性。算法在梵高绘画图像数据集上主要与CycleGAN进行对比实验,评估指标FID降低9%,SSIM提升11.8%,PSNR提高3.9%,且人类主观评估也有显著提升。实验结果表明算法较CycleGAN有更好的风格迁移效果。

关键词: 图像风格迁移, 边缘检测器, 多头注意力, 风格特征, CycleGAN

Abstract: Image style transfer has an important application in the field of art painting, and the existing art painting style transfer algorithms cannot well transfer the unique strokes and the contour features of the objects in the image of a specific-style work. In order to achieve better style transfer effect, a style transfer method for art painting images based on stroke and contour constraints is proposed. A pre-trained edge detector is used to extract the stroke features of the style image and the content image, and a loss function is designed to emphasize the stroke consistency between the two; erosion and blurring techniques are used to simulate the diffusion effect of pigments in oil paintings, and contour constraints are imposed on the object contours in the content image. The multi-head attention mechanism is introduced into the generative network to focus on key stylistic features, and the loss function adopts Smooth L1 instead of L1 to improve the training stability. The algorithm is mainly compared with CycleGAN in the experiments on the Van Gogh painting image dataset. The evaluation metric FID is reduced by 9%; SSIM is improved by 11.8%; PSNR is improved by 3.9%; and the human subjective evaluation is also significantly higher. The experimental results show that the algorithm has better style transfer effect than CycleGAN.

Key words: image style transfer, edge detector, multi-head attention, stylistic features, CycleGAN

中图分类号: 

  • TP391