[论文解读] XMP-Font: Self-Supervised Cross-Modality Pre-training for Few-Shot Font Generation
XMP-Font 提出了一种基于 Transformer 的自监督跨模态预训练框架,通过同时利用字形图像和笔画标签作为条件,学习统一的、多尺度的风格表征,以实现少样本字体生成。通过在不进行微调的情况下预训练编码器并利用笔画级监督,该方法仅使用一个参考字形便在未见字体领域实现了 28% 的劣化案例率降低和创纪录的 87.5% 成功率。
Generating a new font library is a very labor-intensive and time-consuming job for glyph-rich scripts. Few-shot font generation is thus required, as it requires only a few glyph references without fine-tuning during test. Existing methods follow the style-content disentanglement paradigm and expect novel fonts to be produced by combining the style codes of the reference glyphs and the content representations of the source. However, these few-shot font generation methods either fail to capture content-independent style representations, or employ localized component-wise style representations, which is insufficient to model many Chinese font styles that involve hyper-component features such as inter-component spacing and "connected-stroke". To resolve these drawbacks and make the style representations more reliable, we propose a self-supervised cross-modality pre-training strategy and a cross-modality transformer-based encoder that is conditioned jointly on the glyph image and the corresponding stroke labels. The cross-modality encoder is pre-trained in a self-supervised manner to allow effective capture of cross- and intra-modality correlations, which facilitates the content-style disentanglement and modeling style representations of all scales (stroke-level, component-level and character-level). The pre-trained encoder is then applied to the downstream font generation task without fine-tuning. Experimental comparisons of our method with state-of-the-art methods demonstrate our method successfully transfers styles of all scales. In addition, it only requires one reference glyph and achieves the lowest rate of bad cases in the few-shot font generation task 28% lower than the second best
研究动机与目标
- 为解决现有少样本字体生成方法依赖组件级或通用风格表征的局限性,这些方法无法捕捉如组件间间距和连笔模式等多尺度风格特征。
- 通过用笔画级监督替代组件级监督,提升风格表征的可靠性,减少原子单元数量,并增强对未见组件的泛化能力。
- 通过在自监督方式下训练的统一跨模态 Transformer 编码器,实现从笔画、组件到字符的多尺度内容-风格解耦。
- 通过冻结预训练编码器并直接将风格表征迁移至下游字体生成任务,消除推理阶段微调的需要。
- 仅使用一个参考字形,实现对多样化源字体和未见目标风格的高保真、一致的字体生成。
提出的方法
- 使用跨模态 Transformer 编码器,联合以字形图像和对应笔画标签为条件,学习多尺度下的跨模态与模态内相关性。
- 通过掩码图像建模和掩码笔画标注的自监督方式对编码器进行预训练,以在无需人工标注的情况下捕捉多尺度风格表征。
- 将预训练的编码器冻结,作为下游字体生成任务中的固定特征提取器,从而避免微调的需要。
- 采用带有 ECA 模块的解耦网络,分离内容与风格表征,增强解耦效果并保留结构细节。
- 在训练过程中引入笔画损失,以强化结构一致性,并提升对笔画顺序与形态的敏感度。
- 生成器使用大小为 $8\times 8$ 的特征图,在保真度与 GPU 显存限制之间取得平衡;在消融研究中使用下采样层以测试更小的表示。
实验结果
研究问题
- RQ1自监督跨模态预训练策略是否能提升少样本字体生成中多尺度风格表征的可靠性?
- RQ2与组件级监督相比,使用笔画级监督是否能提升对汉字未见组件和风格的泛化能力?
- RQ3冻结的预训练编码器是否能在不微调下游任务的情况下实现更优的少样本字体生成性能?
- RQ4所提出的笔画损失在保留结构细节和提升内容-风格解耦方面效果如何?
- RQ5架构选择如特征图大小和解耦网络对生成质量与结构保真度的影响如何?
主要发现
- XMP-Font 在未见字体领域的少样本字体生成任务中达到创纪录的 87.5% 成功率,显著优于先前方法。
- 与第二好的方法相比,该方法将劣化案例率降低了 28%,展现出更高的可靠性与一致性。
- 消融研究证实,若移除笔画损失,结构保留能力下降,客观指标降低:在未见场景下,FID 从 31.14 上升至 70.56。
- 使用 $4\times 4$ 特征图而非 $8\times 8$ 会导致细粒度结构与风格特征的丢失,表现为 L1 和笔画损失升高,PSNR 与 SSIM 降低。
- 移除基于 ECA 的解耦网络会降低内容-风格解耦效果,导致结构伪影和错误的风格迁移,如定性结果与指标下降所示。
- 预训练策略至关重要:从零开始训练编码器(无预训练)无法收敛,而微调编码器在下游训练中也表现不如冻结的预训练版本。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。