Difficulty-aware multi-scale feature pyramid network for transformer-based offline Chinese handwritten text line recognition
摘要
Offline Chinese handwritten text-line recognition (HCTR) remains challenging because standard CTC training on large-scale data is often dominated by abundant easy samples, while single-scale visual features are insufficient for simultaneously capturing fine-grained stroke details and higher-level structural semantics. To address these issues, we propose DA-MSFPN, an end-to-end difficulty-aware multi-scale recognition framework built on a CNN–Transformer backbone. DA-MSFPN constructs a multi-scale feature pyramid from hierarchical CNN representations and performs time-step-wise adaptive fusion via a lightweight gated attention module, while a two-stage sample-level difficulty-aware training strategy (SL-DAT) is introduced to improve hard-sample learning. On the CASIA-HWDB2.0–2.2 text-line benchmark, our method achieves 2.08% CER and 97.92% CR with a character-level 5-gram language model trained on an independent external Chinese corpus (Chinese Wikipedia + THUCNews), substantially improving over the baseline CER of 4.52%. To isolate architectural gains from language-model smoothing, we also evaluate DA-MSFPN under greedy decoding and observe consistent improvements over the baseline. Additional experiments on ICDAR2013 further support the cross-dataset robustness of the proposed framework on Chinese handwritten text-line benchmarks. The predicted difficulty scores show a stable positive correlation with the character-normalized CTC loss and yield a monotonic CER stratification, supporting the effectiveness of the proposed difficulty-aware mechanism.