Journal of Computer Applications ›› 2022, Vol. 42 ›› Issue (10): 3209-3216.DOI: 10.11772/j.issn.1001-9081.2021081457

• Multimedia computing and computer simulation • Previous Articles    

Neural style transfer algorithm based on Laplacian operator and color retention

Yongqian TAN, Fanju ZENG   

  1. School of Big Data Engineering,Kaili University,Kaili Guizhou 556011,China
  • Received:2021-08-10 Revised:2021-12-17 Accepted:2021-12-17 Online:2022-01-07 Published:2022-10-10
  • Contact: Fanju ZENG
  • About author:TAN Yongqian, born in 1984, M. S. , associate professor. His research interests include graphics and image processing, optoelectronic materials and devices.
    ZENG Fanju, born in 1986, Ph. D. , associate professor. Her research interests include optical image processing, optoelectronic materials and devices.
  • Supported by:
    Basic Research Program of Guizhou Province in 2022 (Natural Science) (Qiankehe Jichu-ZK[2022] General 526), Guizhou Provincial Department of Education’s Youth Science and Technology Talent Growth Project (Qianjiaohe KY [2017] 335), Guizhou Provincial Science and Technology Cooperation Program (Qiankehe LH [2017] 7161), Special Project of "First-class Construction and Cultivation Discipline in Guizhou Province?Ethnology"(YLXKJS0071)

基于拉普拉斯算子和颜色保留的神经风格迁移算法

谭永前, 曾凡菊   

  1. 凯里学院 大数据工程学院,贵州 凯里 556011
  • 通讯作者: 曾凡菊
  • 作者简介:第一联系人:谭永前(1984—),男(苗族),贵州黄平人,副教授,硕士,主要研究方向:图形图像处理、光电材料与器件
    曾凡菊(1986—),女(土族),贵州黄平人,副教授,博士,主要研究方向:光学图像处理、光电材料与器件。z‑f‑j‑1@163.com
  • 基金资助:
    贵州省2022年度基础研究计划(自然科学)项目(黔科合基础-ZK[2022]一般526);贵州省教育厅青年科技人才成长项目(黔教合KY字[2017]335);贵州省科技合作计划项目(黔科合LH字[2017]7161号);“贵州省区域内一流建设培育学科?民族学”专项课题(YLXKJS0071)

Abstract:

There are some problems in results of the neural style transfer algorithms, such as artifacts, color loss, and blurred contour, which are negative to the overall artistic effect. Therefore, a neural style transfer algorithm based on Laplacian operator and Color Retention (LCR) was proposed. Content loss term, style loss, histogram loss, and Laplacian loss are utilized in the proposed LCR algorithm to construct the total loss function. Because histogram loss and Laplacian loss are used in the LCR algorithm, the proposed algorithm has better overall artistic effect on the stylized result images than Image Style Transfer using Convolutional Neural Networks (IST-CNN) algorithm and Deep Feature Perturbation (DFP) algorithm. Firstly, the influence of image noise on latter calculation of each loss was reduced by denoising input content image and style image. Secondly, the separation of image brightness channel L and color channel a, b was achieved by converting content image and style image from RGB space to Lab space. And the brightness information of content image was transferred to style image to preserve the color of content image. Finally, in Convolutional Neural Network (CNN), the total loss function was iteratively optimized, and then the stylized result image was output. Compared with IST-CNN and DFP algorithms, the proposed LCR algorithm has the Peak Signal-to-Noise Ratio (PSNR) improved by 12.418 dB and 8.038 dB approximately and respectively, the Structural SIMilarity (SSIM) improved by about 0.348 06 and 0.258 54 approximately and respectively, and the Mean Square Error (MSE) decreased by about 0.653 76 and 0.296 00 respectively. Experimental results show that LCR algorithm has advantage in the overall visual effect of stylized drawing.

Key words: histogram loss, image style transfer, Laplacian operator, style loss, content loss

摘要:

针对神经风格迁移算法结果中存在伪影、颜色丢失、轮廓模糊不清等影响整体艺术效果的问题,提出了一种基于拉普拉斯算子和颜色保留(LCR)的神经风格迁移算法。所提LCR算法使用内容损失项、风格损失项、直方图损失项以及拉普拉斯损失项构建总损失函数。由于在LCR算法中使用了直方图损失项和拉普拉斯损失项,因此,LCR算法与基于卷积神经网络的图像风格迁移(IST-CNN)算法、基于深度特征扰动(DFP)算法相比,对风格化结果图有更好的整体艺术效果。首先,通过对输入内容图像和风格图像进行去噪处理,减小了图像噪声对后续各个损失项计算的影响;其次,对内容图像和风格图像进行RGB空间到Lab空间的转换,以实现图像亮度通道L和颜色通道a、b的分离,并把内容图像的亮度信息迁移到风格图像上,从而达到内容图像颜色保留的目的;最后,在卷积神经网络(CNN)中对总损失函数进行迭代优化并输出风格化结果图。与IST-CNN和DFP算法相比,所提LCR算法的峰值信噪比(PSNR)平均分别提高了约12.418 dB和8.038 dB,结构相似性(SSIM)平均分别提高了约0.348 06和0.258 54,均方差(MSE)平均分别降低了0.653 76和0.296 00。实验结果表明,LCR算法有更好的风格化绘制整体视觉效果。

关键词: 直方图损失, 图像风格迁移, 拉普拉斯算子, 风格损失, 内容损失

CLC Number: