图片风格融合及快速迁移

2021-03-08 09:41:28陈良
软件工程 2021年1期

陈良

摘  要:通过卷积神经网络对不同图片的内容和风格进行融合,可生成风格多樣化的图片。这不但为影视制作提供了丰富的素材,更有利于图像修复和图像增强。针对这类问题,前人曾提出一些算法,但很难在时间和空间方面都达到很好的效果。这里提出一种基于TensorFlow(将复杂的数据结构传输至人工智能神经网中进行分析和处理过程的系统)的条件归一化网络来支持多风格融合及图片快速迁移,多风格可共用一个网络模型,这大大减少了算法耗时,并缓解了模型存储耗费空间大的问题,节省了计算机资源。时间上优于传统迁移算法三个数量级,空间上25种风格可共用一个模型。同时,更大程度地保留了内容图的语义特征,具有更好的视觉效果。

关键词:条件归一化网络;风格融合;快速迁移;共享模型

中图分类号:TP312     文献标识码:A

文章编号:2096-1472(2021)-01-21-04

Abstract: Content and style of different pictures can be merged by convolutional neural network to generate pictures with diversified styles. This not only provides rich materials for film and television production, but also facilitates image restoration and enhancement. Aiming at this kind of problem, previous researchers have proposed some algorithms, which turned out to be difficult to achieve good results in both time and space. This paper proposes a conditional normalization network based on TensorFlow (a system that transmits complex data structures to artificial intelligence neural networks for analysis and processing) to support multi-style fusion and rapid image migration. Multiple styles share a network model, which greatly reduces time-consuming algorithm and relieves large space consumption for model storage, saving computer resources. It is three orders of magnitude better in time than traditional migration algorithms, and 25 styles in space share one model. At the same time, semantic features of the content map are retained to a greater extent, and the visual effect is better.

Keywords: conditional normalization network; style fusion; rapid migration; sharing model

1   引言(Introduction)

图像风格迁移不仅能改善电影动画制作效果,降低制作成本,更重要的是它有利于图像修复。图像风格迁移算法最初从研究纹理合成技术开始,大多数纹理合成算法采用非参数方法[1],并没有提取图像的高级特征,对纹理较为复杂的图像很难做到理想的风格迁移。Gatys[2]等人提出了一种基于CNN的传统迁移算法,增强了迁移效果,但耗时很大。Johnson[3]等人提出快速迁移算法即训练一种前馈生成网络,生成速度提高了三个数量级,但仍然无法同时获取多种风格。

本文提出一种条件归一化网络算法,对每种风格归一化后再对其风格参数进行特定的调节,令最终模型具有多风格同步迁移且支持风格融合的能力。……

登录APP查看全文