PostScript字形格式在Transformer模型中分类矢量字体表现更优
Transformer-Based Vector Font Classification Using Different Font Formats: TrueType versus PostScript
- 用Transformer处理矢量字形,比较TrueType与PostScript格式
- PostScript格式分类准确率更高,因更利于信息聚合
- 为矢量图形深度学习提供格式选择依据,适合图像生成研究者
现代字体采用矢量格式,可无损缩放。尽管深度学习在位图字体上已有大量研究,但针对矢量字体的研究仍较少。现有研究常沿用传统字体表示方式,而未考虑格式对模型性能的影响。本文发现,在基于Transformer的矢量字体分类任务中,基于PostScript轮廓的表示优于TrueType轮廓。TrueType以点序列和标志表示字符形状,PostScript则以命令序列表达。以往研究中,PostScript多用于矢量图形场景,TrueType则聚焦于字体本身,格式选择主要受文件规范和惯例影响,而非性能考量。目前极少有研究对比两种格式的嵌入表示效果。我们的结果表明,信息聚合在基于Transformer的矢量图形深度学习中至关重要,类似于语言模型中的分词或图像识别中的图像块划分。这一发现为未来矢量图形研究中的轮廓格式选择提供了重要指导。
原文摘要 · Abstract (English)
Modern fonts adopt vector-based formats, which ensure scalability without loss of quality. While many deep learning studies on fonts focus on bitmap formats, deep learning for vector fonts remains underexplored. In studies involving deep learning for vector fonts, the choice of font representation has often been made conventionally. However, the font representation format is one of the factors that can influence the computational performance of machine learning models in font-related tasks. Here we show that font representations based on PostScript outlines outperform those based on TrueType outlines in Transformer-based vector font classification. TrueType outlines represent character shapes as sequences of points and their associated flags, whereas PostScript outlines represent them as sequences of commands. In previous research, PostScript outlines have been predominantly used when fonts are treated as part of vector graphics, while TrueType outlines are mainly employed when focusing on fonts alone. Whether to use PostScript or TrueType outlines has been mainly determined by file format specifications and precedent settings in previous studies, rather than performance considerations. To date, few studies have compared which outline format provides better embedding representations. Our findings suggest that information aggregation is crucial in Transformer-based deep learning for vector graphics, as in tokenization in language models and patch division in bitmap-based image recognition models. This insight provides valuable guidance for selecting outline formats in future research on vector graphics.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。