To improve the image quality of target font, few shot font generation model MS-Font with multi-scale features was proposed to solve the problems of single feature extraction, missing details of target font generation and poor overall aesthetics in current font generation methods. In the paper, the model MS-Font was proposed to design a Multiscale generator (MG), which was used to extract the information features of different scale structure of text, and integrate the multi-scale features of shallow and deep information to build the connection between different scale feature maps, so as to enhance the effective expression of font content and style information. and improve the font reconstruction capability of the generation network. The results of a large number of experiments on the given data set showed that the proposed MS-Font model was superior to the comparison algorithm, and the LPIPS increased by 0.007, SSIM increased by 0.12, ACC (S) increased by 5.2, ACC (C) increased by 4.0 on the basis of FUNIT model, which confirmed the effectiveness of the proposed MS-Font model.
小样本字体生成(few-shot font generation,FFG)[1]是目前字体生成领域的主流任务之一,旨在使用少量参考字体对源字形字体进行转换,实现在字符语义内容不变的情况下,生成其他字体风格的文字。近年来,随着大众传媒的迅猛发展,小样本字体生成在个性化字体设计中的需求日益增长[2],如何高效、低成本地设计出指定文字风格的字体库成为亟待解决的重要问题。
1 WU X,HU Z,SHENG L, et al. Styleformer: real⁃time arbitrary style transfer via parametric style composition[C]//Proceedings of the IEEE/CVF International Conference on Computer Vision. On Computer Vision:IEEE Computer Society, 2021:14618⁃14627.
。Li等引入注意力机制,以捕获全局字体风格和局部字体风格2
2 LI C,TANIGUCHI Y,LU M,et al. Few⁃shot font style transfer between different languages[C]//Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision.On Computer Vision: IEEEComputer Society,January 5⁃9,2021:433⁃442.
尽管当前方法在实现小样本字体生成方面已取得一定成果,但仍然存在字体生成方法提取特征单一、生成目标字体细节缺失、整体美观性欠佳的问题。针对目前模型提取特征单一的问题,本文提出融合多尺度特征的小样本字体生成模型(few shot font generation by integrating multi-scale features,MS-Font)。提出模型MS-Font以FUNIT为基本框架结构,设计了用于提取不同层次特征的多尺度生成器(multiscale generator,MG)组件。通过多尺度特征的捕获与融合,以构建多尺度特征图之间的联系,以增强字体内容与风格信息特征的有效表达,提高生成网络的字体重构能力。
为了有效获取不同层次信息,本文提出融合多尺度特征的小样本字体生成模型(few shot font generation by integrating multi-scale features,MS-Font),MS-Font模型由多尺度生成器MG和判别器D两部分构成,其中多尺度生成器MG由多尺度特征提取模块(多尺度内容特征提取分支、多尺度风格特征提取分支)和解码器构成,基本框架见图1。
① WU X,HU Z,SHENG L, et al. Styleformer: real⁃time arbitrary style transfer via parametric style composition[C]//Proceedings of the IEEE/CVF International Conference on Computer Vision. On Computer Vision:IEEE Computer Society, 2021:14618⁃14627.
TIANY. Rewrite: Neural style transfer for chinese fonts [EB/OL]. (2021-05-26) [2023-10-01].
[4]
CHANGB, ZHANGQ, PANS, et al. Generating handwritten Chinese characters using CycleGAN[J]. arXiv preprint arXiv, 2018: 1801.08624.
[5]
ZHANGY, ZHANGY, CAIW, et al. Separating style and content for generalized style transfer[J]. arXiv preprint arXiv,2017: 1711.06454.
[6]
SUND, RENT, LIC, et al. Learning to write stylized chinese characters by reading a handful of examples[J]. arXiv preprint arXiv,2017:1712.06424.
[7]
TANGL, CAIY, LIUJ, et al. Few-shot font generation by learning fine-grained local styles[J]. arXiv preprint arXiv,2022:2205.09965.
[8]
ZENGJ, CHENQ, LIUY, et al. StrokeGAN: Reducing mode collapse in Chinese font generation via stroke encoding[J]. arXiv preprint arXiv,2020: 2012.08687.
[9]
ZENGJ, WANGY, CHENQ, et al. StrokeGAN+: Few-shot semi-supervised chinese font generation with stroke encoding[J]. arXiv preprint arXiv,2022:2211.06198.
[10]
LINT, MAZ, LIF, et al. Drafting and revision: Laplacian pyramid network for fast high-quality artistic style transfer[J]. arXiv preprint arXiv,2021:2104.05376.
[11]
ANJ, HUANGS, SONGY, et al. ArtFlow: Unbiased image style transfer via reversible neural flows[J]. arXiv preprint arXiv,2021:2103.16877.