UniCalli: A Unified Diffusion Framework for Column-Level Generation and Recognition of Chinese Calligraphy
Tianshuo Xu, Kai Wang, Zhifei Chen, Leyi Wu, Tianshui Wen, Fei Chao, Ying-Cong Chen
TL;DR
UniCalli introduces a unified diffusion-transformer framework that jointly handles column-level recognition and generation of Chinese calligraphy, addressing both glyph accuracy and page-level layout with global coherence. By modeling latent triplets and spatial priors, and employing strategies like Duplicate RoPE and Conditional Dropout, it achieves state-of-the-art generative fidelity while maintaining competitive recognition, even in limited-data regimes. The approach is validated on a large, annotated dataset and demonstrated to generalize to ancient scripts such as Oracle bone inscriptions and Egyptian hieroglyphs, highlighting significant potential for digital preservation and cross-cultural scholarship. The work also contributes a substantial resource consisting of a large-world calligraphy dataset and public release of code and models, enabling broader research and applications in script analysis and replication.
Abstract
Computational replication of Chinese calligraphy remains challenging. Existing methods falter, either creating high-quality isolated characters while ignoring page-level aesthetics like ligatures and spacing, or attempting page synthesis at the expense of calligraphic correctness. We introduce \textbf{UniCalli}, a unified diffusion framework for column-level recognition and generation. Training both tasks jointly is deliberate: recognition constrains the generator to preserve character structure, while generation provides style and layout priors. This synergy fosters concept-level abstractions that improve both tasks, especially in limited-data regimes. We curated a dataset of over 8,000 digitized pieces, with ~4,000 densely annotated. UniCalli employs asymmetric noising and a rasterized box map for spatial priors, trained on a mix of synthetic, labeled, and unlabeled data. The model achieves state-of-the-art generative quality with superior ligature continuity and layout fidelity, alongside stronger recognition. The framework successfully extends to other ancient scripts, including Oracle bone inscriptions and Egyptian hieroglyphs. Code and data can be viewed in \href{https://github.com/EnVision-Research/UniCalli}{this URL}.
