计算机工程

• •    

基于Sobel滤波器的图像风格转换

  

  • 发布日期:2020-12-30

Image style conversion based on sobel filter

  • Published:2020-12-30

摘要: 基于迭代的图像风格转换是将图像的内容与风格信息进行分离然后重组,在图像重组的时候没有考 虑内容图像的结构问题,导致生成的图像存在线条扭曲。针对这一问题,提出了一种基于边缘检测的算法 来约束图像重组时的信息。边缘检测使用 Sobel 滤波器,用卷积神经网络在内容图像和生成图像相同的卷 积层进行边缘信息的提取,损失函数选择均方误差,将边缘损失、内容损失和风格损失的加权代数和作为 神经网络的总损失。实验结果表明,通过加入边缘检测的方法进行图像风格转换,有效的抑制了图像的线 条扭曲,降低了图像的噪声,使得生成了更高质量的图像。

Abstract: The iterative image style conversion is to separate and reorganize the content and style information of the image. When the image is reorganized, the structure of the content image is not considered, resulting in distortion of lines in the generated image. To solve this problem, an algorithm based on edge detection is proposed to constrain the information during image reorganization. Edge detection uses sobel filter, and convolutional neural network is used to extract edge information in the same convolutional layer of content image and generated image. The loss function selects the mean square error, and the weighted algebraic sum of edge loss, content loss and style loss The total loss of the neural network. The experimental results show that the image style conversion by adding the edge detection method effectively suppresses the distortion of the image lines, reduces the image noise, and produces a higher quality image.