自適應雙分支網路用於手寫筆跡生成
DNA: Dual-branch Network with Adaptation for Online Handwriting Generation
摘要
線上手寫生成(Online Handwriting Generation, OHG)透過合成更多多樣且具人類書寫特徵的筆跡樣本,能達到有效增強手寫文字辨識模型的泛化能力。然而,現有的 OHG 方法在生成未見過的字元時仍面臨挑戰,特別是對於結構複雜的語言(如繁體中文),限制了其於真實應用場景中的可行性。為此,本文提出一種新的 OHG 架構——DNA(Dual-branch Network with Adaptation)自適應雙分支網路,可於訓練階段未觀察到特定書寫風格與字元的情況下,仍能生成自然且真實的筆跡樣本。
所提出的 DNA 模型包含兩個互補的分支:風格自適應分支與字元自適應分支。其中,風格分支學習筆劃屬性,如書寫方向、間距、佈局與筆勢流暢度,以捕捉真實的書寫風格;字元分支則透過全域與區域編碼器分別萃取字元的結構資訊與紋理細節,藉此提升模型對未見字元的泛化能力。
實驗結果顯示,所提出的 DNA 模型在未見字元的 OHG 任務中表現卓越,整體性能達到目前最佳水準,證實了其於開放字元集手寫生成任務中的有效性與潛力。
所提出的 DNA 模型包含兩個互補的分支:風格自適應分支與字元自適應分支。其中,風格分支學習筆劃屬性,如書寫方向、間距、佈局與筆勢流暢度,以捕捉真實的書寫風格;字元分支則透過全域與區域編碼器分別萃取字元的結構資訊與紋理細節,藉此提升模型對未見字元的泛化能力。
實驗結果顯示,所提出的 DNA 模型在未見字元的 OHG 任務中表現卓越,整體性能達到目前最佳水準,證實了其於開放字元集手寫生成任務中的有效性與潛力。
Online handwriting generation (OHG) enhances handwriting recognition models by synthesizing diverse, human-like samples. However, existing OHG methods struggle to generate unseen characters, particularly in glyph-based languages like Chinese, limiting their real-world applicability. In this paper, we introduce our method for OHG, where the writer’s style and the characters generated during testing are unseen during training. To tackle this challenge, we propose a \underline{D}ual-branch \underline{N}etwork with \underline{A}daptation (DNA), which comprises an adaptive style branch and an adaptive content branch. The style branch learns stroke attributes such as writing direction, spacing, placement, and flow to generate realistic handwriting. Meanwhile, the content branch is designed to generalize effectively to unseen characters by decomposing character content into structural information and texture details, extracted via local and global encoders, respectively. Extensive experiments demonstrate that our DNA model is well-suited for the unseen OHG setting, achieving state-of-the-art performance.