让手写轨迹更自然连贯,精准还原书写风格。
CASHG: Context-Aware Stylized Online Handwriting Generation
- 显式建模字符间连接性,结合上下文生成连笔手写
- 在基准测试中提升连笔与间距相似度,优于现有方法
- 适合需要真实手写风格的文档生成与个性化输入
在线手写将笔画表示为时间有序的轨迹,便于在多种应用中转换和复用。然而,生成能忠实反映作者风格的句子级在线手写仍具挑战,因句法合成需依赖上下文相关的字符、笔画连续性和间距。先前方法将这些边界特性视为序列建模的隐含结果,在句子尺度下可靠性下降且组合多样性有限。本文提出CASHG,一种上下文感知的风格化在线手写生成模型,显式建模字符间连通性以实现风格一致的句子级轨迹合成。CASHG采用字符上下文编码器获取字符身份与句子依赖上下文记忆,并在基于双词感知的滑动窗口Transformer解码器中融合,强调局部前驱-当前过渡,辅以门控上下文融合实现句级上下文建模。训练采用三阶段课程学习,从孤立字形逐步过渡到完整句子,增强在稀疏转移覆盖下的鲁棒性。此外,引入连通性与间距度量(CSM),一个关注边界的评估套件,量化草书连通性和间距相似性。在匹配基准的评估协议下,CASHG在CSM指标上持续优于对比方法,同时在基于DTW的轨迹相似性上保持竞争力,人类评估进一步验证了其优势。
原文摘要 · Abstract (English)
Online handwriting represents strokes as time-ordered trajectories, which makes handwritten content easier to transform and reuse in a wide range of applications. However, generating natural sentence-level online handwriting that faithfully reflects a writer's style remains challenging, since sentence synthesis demands context-dependent characters with stroke continuity and spacing. Prior methods treat these boundary properties as implicit outcomes of sequence modeling, which becomes unreliable at the sentence scale and under limited compositional diversity. We propose CASHG, a context-aware stylized online handwriting generator that explicitly models inter-character connectivity for style-consistent sentence-level trajectory synthesis. CASHG uses a Character Context Encoder to obtain character identity and sentence-dependent context memory and fuses them in a bigram-aware sliding-window Transformer decoder that emphasizes local predecessor--current transitions, complemented by gated context fusion for sentence-level context.Training proceeds through a three-stage curriculum from isolated glyphs to full sentences, improving robustness under sparse transition coverage. We further introduce Connectivity and Spacing Metrics (CSM), a boundary-aware evaluation suite that quantifies cursive connectivity and spacing similarity. Under benchmark-matched evaluation protocols, CASHG consistently improves CSM over comparison methods while remaining competitive in DTW-based trajectory similarity, with gains corroborated by a human evaluation.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。