Computer Engineering and Applications ›› 2022, Vol. 58 ›› Issue (18): 104-110.DOI: 10.3778/j.issn.1002-8331.2109-0484

• Generative Adversarial Networks • Previous Articles     Next Articles

Image Animation Stylization Based on Generative Adversarial Network

WANG Yifan, ZHAO Leyi, LI Yi   

  1. College of Computer Science and Technology, Sichuan University, Chengdu 610065, China
  • Online:2022-09-15 Published:2022-09-15

基于生成对抗网络的图像动漫风格化

王一凡,赵乐义,李毅   

  1. 四川大学 计算机学院,成都 610065

Abstract: The current cartoon style image generation methods still have limitations, such as the unrealistic color, inadequate processing of local details of the picture, and so on. In order to quickly convert the input image into the style of animation, you need to combine deep learning. Based on the idea of generative adversarial network, the proposed algorithm is a generative adversarial network of animation stylized coding, which transforms the input image style into Hayao Miyazaki’s animated film style. The network structure has been greatly optimized by adding the adaptive instance normalization layer(AdaIN) module and the multi-layer perceptron(MLP) module, while improving the experimental effect. In the loss function part, learned perceptual image patch similarity(LPIPS) is introduced as the content loss function, and the binary cross entropy loss function(BCELoss) is used as the adversarial loss function. Experimental results show that the network has a very good effect on animated pictures, with an FID score of 72, which can be flexibly applied to various types of pictures animating.

Key words: style transfer, image to image translation, generative adversarial network(GAN), animation picture, perceptual loss

摘要: 目前的卡通风格图片生成方法仍然存在局限,如色彩不真实、图片局部细节处理不到位等,要想快速将输入图片转换为动漫的风格输出还需要结合深度学习进行研究。基于生成对抗网络的思想,提出了一种动漫风格化编码的生成对抗网络,将输入的图像风格转变为宫崎骏动画电影的风格。网络结构加入自适应实例归一化层(AdaIN)模块和多层感知机(MLP)模块,得到很大优化,同时提高实验效果。在损失函数部分,引入图像感知相似性(lpips)作为内容损失函数,二分类交叉熵(binary cross entropy)损失函数(BCELoss)作为对抗损失函数。实验结果表明,该网络对于动漫化图片起到了很好的效果,FID分数72,能够灵活适用于各种类型的图片动漫化。

关键词: 风格迁移, 图像到图像转换, 生成对抗网络, 动漫化图片, 感知损失