[论文解读] Few-Shot Font Generation by Learning Fine-Grained Local Styles
本文提出 FSFont,一种少样本字体制作模型,通过交叉注意力机制在内容图像与参考图像之间对齐空间特征,从参考字形中学习细粒度局部风格(FLS)。通过关注局部风格表征并在每个空间位置聚合这些表征,该方法在风格一致性和保真度方面优于当前最先进方法,经由用户研究和定量指标验证。
Few-shot font generation (FFG), which aims to generate a new font with a few examples, is gaining increasing attention due to the significant reduction in labor cost. A typical FFG pipeline considers characters in a standard font library as content glyphs and transfers them to a new target font by extracting style information from the reference glyphs. Most existing solutions explicitly disentangle content and style of reference glyphs globally or component-wisely. However, the style of glyphs mainly lies in the local details, i.e. the styles of radicals, components, and strokes together depict the style of a glyph. Therefore, even a single character can contain different styles distributed over spatial locations. In this paper, we propose a new font generation approach by learning 1) the fine-grained local styles from references, and 2) the spatial correspondence between the content and reference glyphs. Therefore, each spatial location in the content glyph can be assigned with the right fine-grained style. To this end, we adopt cross-attention over the representation of the content glyphs as the queries and the representations of the reference glyphs as the keys and values. Instead of explicitly disentangling global or component-wise modeling, the cross-attention mechanism can attend to the right local styles in the reference glyphs and aggregate the reference styles into a fine-grained style representation for the given content glyphs. The experiments show that the proposed method outperforms the state-of-the-art methods in FFG. In particular, the user studies also demonstrate the style consistency of our approach significantly outperforms previous methods.
研究动机与目标
- 解决现有少样本字体制作方法依赖全局或组件级风格解耦的局限性,此类方法无法捕捉细粒度局部风格变化。
- 不将风格建模为全局或粗粒度组件表征,而是作为笔画、偏旁和边缘等位置上的局部特征。
- 通过在像素级粒度上学习内容字形与参考字形之间的精确空间对应关系,提升风格迁移保真度。
- 通过一个自重建分支监督参考编码器学习,提升风格一致性与细节恢复能力。
- 基于汉字的构字规则,使用广度优先搜索算法自动选择参考字形。
提出的方法
- 参考编码器从参考字形图像中提取细粒度局部风格表征(FLS),将特征图中的每个空间位置视为一个局部风格单元。
- 基于交叉注意力的风格聚合模块(SAM)以内容字形特征作为查询,参考特征作为键/值,关注相关联的局部风格。
- 注意力机制动态地为内容字形中每个空间位置分配最合适的参考局部风格,实现精确风格迁移。
- 自重建分支通过从自身特征重建目标字形来训练参考编码器,提升对应关系学习与细节保留能力。
- 基于广度优先搜索的算法,根据结构与构字规则,自动为每个目标字符选择最优参考字形。
- 模型通过对抗损失与感知损失进行端到端训练,以确保高保真生成与风格一致性。

实验结果
研究问题
- RQ1细粒度局部风格表征是否能超越全局或组件级风格建模,提升少样本字体制作性能?
- RQ2交叉注意力机制在局部层级上学习内容与参考字形之间空间对应关系的效率如何?
- RQ3关注局部风格特征是否能带来更好的视觉保真度与风格一致性?
- RQ4自重建分支是否能提升模型学习准确风格对应关系与保留细节的能力?
- RQ5基于构字规则的自动化参考选择是否能提升生成质量并减少对手动标注的依赖?
主要发现
- 所提出的 FSFont 方法在定量指标与用户研究中均优于当前最先进少样本字体制作模型。
- 用户研究表明,FSFont 的风格一致性显著优于先前方法,在人类评估中具有统计显著偏好。
- 即使仅使用一个或两个参考字形,该模型也能实现高保真生成,准确保留笔画末端与曲率等细节。
- 自重建分支改善了特征对齐,减少了模式崩溃,从而生成更一致且逼真的输出。
- 基于广度优先搜索的自动化参考选择可生成高质量参考集,提升生成性能,且无需人工标注。

更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。