Skip to main content
QUICK REVIEW

[论文解读] VQ-Font: Few-Shot Font Generation with Structure-Aware Enhancement and Quantization

Mingshuai Yao, Yabo Zhang|arXiv (Cornell University)|Aug 27, 2023
Generative Adversarial Networks and Image SynthesisComputer Science被引用 3
一句话总结

VQ-Font 提出了一种基于 VQGAN 的少样本字体生成框架,通过使用预训练代码本进行标记先验优化,并结合组件级别的风格重校准实现结构感知增强,从而提升字形保真度。通过借鉴汉字结构设计原则,并在离散标记空间中优化生成结果,VQ-Font 显著减少了伪影,提升了视觉质量,尤其在复杂衬线体和艺术字体上表现优异,无论在定量还是定性指标上均优于先前方法。

ABSTRACT

Few-shot font generation is challenging, as it needs to capture the fine-grained stroke styles from a limited set of reference glyphs, and then transfer to other characters, which are expected to have similar styles. However, due to the diversity and complexity of Chinese font styles, the synthesized glyphs of existing methods usually exhibit visible artifacts, such as missing details and distorted strokes. In this paper, we propose a VQGAN-based framework (i.e., VQ-Font) to enhance glyph fidelity through token prior refinement and structure-aware enhancement. Specifically, we pre-train a VQGAN to encapsulate font token prior within a codebook. Subsequently, VQ-Font refines the synthesized glyphs with the codebook to eliminate the domain gap between synthesized and real-world strokes. Furthermore, our VQ-Font leverages the inherent design of Chinese characters, where structure components such as radicals and character components are combined in specific arrangements, to recalibrate fine-grained styles based on references. This process improves the matching and fusion of styles at the structure level. Both modules collaborate to enhance the fidelity of the generated fonts. Experiments on a collected font dataset show that our VQ-Font outperforms the competing methods both quantitatively and qualitatively, especially in generating challenging styles.

研究动机与目标

  • 为解决在少样本字体生成中,尤其在参考字形有限的复杂汉字字体风格下,生成高保真字形的挑战。
  • 减少现有方法因领域差距和仅使用补丁级注意力机制而常见的缺失细节和扭曲笔画等伪影。
  • 通过融入汉字结构设计原则,将偏旁和部件视为统一整体而非孤立补丁,提升风格迁移的保真度。
  • 通过基于预训练 VQGAN 代码本学习的离散标记空间,对生成结果进行优化,实现更高质量的输出。
  • 通过显式建模内容字形与参考字形之间的结构级对应关系,实现更优的视觉质量和结构一致性。

提出的方法

  • 使用预训练的 VQGAN 学习一个封装真实世界笔画与风格先验的字体代码本,使生成字形可通过映射至离散代码本空间实现优化。
  • 采用基于 Transformer 的模块预测生成字体图像的代码本索引,使模型能借助学习到的标记先验重建高保真输出。
  • 结构级风格增强模块(SSEM)在内容字形与参考字形的结构组件(如偏旁)之间建立对应关系,以重校准细粒度风格特征。
  • 交叉注意力机制计算内容与参考字形之间的补丁级注意力,随后由 SSEM 重新加权,以强调结构级对齐。
  • 该框架整合了内容编码器、风格编码器、交叉注意力模块、SSEM 和解码器,通过端到端训练优化风格迁移与重建性能。
  • 对预训练的字体解码器进行微调,以弥合合成数据与真实世界字体分布之间的领域差距,提升真实感与一致性。
Figure 1: Left: The illustration of missing details and distorted strokes, and Right: the refinement process through token prior encapsulated in our codebook.
Figure 1: Left: The illustration of missing details and distorted strokes, and Right: the refinement process through token prior encapsulated in our codebook.

实验结果

研究问题

  • RQ1预训练的字体标记代码本是否能有效减少少样本字体生成中缺失细节和扭曲笔画等伪影?
  • RQ2在组件级别上,融入汉字结构设计原则如何提升风格迁移的保真度?
  • RQ3结构感知增强在保留笔画一致性和边缘细节方面,与仅使用补丁级注意力相比,优势有多大?
  • RQ4将标记先验优化与结构级风格重校准相结合,是否能在 PSNR、SSIM 和 LPIPS 等定量指标上带来可测量的提升?
  • RQ5该模型在保持高视觉保真度的前提下,能否泛化至复杂字体风格(如衬线体和艺术字体)?

主要发现

  • VQ-Font 在 UFUC 数据集上达到 PSNR 20.249 和 SSIM 0.812,优于基线模型与消融变体。
  • 引入预训练代码本(+C)后,PSNR 提升 0.851,LPIPS 降低 0.012,相较基线模型表现更优。
  • 将代码本与结构级风格增强模块结合(+CS)后,PSNR 进一步提升至 20.249,LPIPS 降低至 0.103,表明存在协同增益。
  • 人工评估显示,VQ-Font 在内容准确性和风格一致性方面表现更优,用户更倾向于选择其结果作为最接近参考字体的输出。
  • 可视化结果表明,SSEM 降低了对无关区域的关注,聚焦于对应结构组件,从而提升了风格对齐效果。
  • 微调预训练解码器显著提升了领域适应能力,使 PSNR 从固定参数时的 20.069 提升至微调后的 20.249,证实其在弥合合成与真实世界分布差距方面的有效性。
Figure 2: Structure component divisions in Chinese characters. Different colors represent different components.
Figure 2: Structure component divisions in Chinese characters. Different colors represent different components.

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。