Zero-Shot Paragraph-level Handwriting Imitation with Latent Diffusion Models
Open Access
- 12 July 2025
- journal article
- research article
- Published by Springer Nature in International Journal of Computer Vision
- Vol. 133 (10) , 7054-7075
Abstract
The imitation of cursive handwriting is mainly limited to generating handwritten words or lines. Multiple synthetic outputs must be stitched together to create paragraphs or whole pages, whereby consistency and layout information are lost. To close this gap, we propose a method for imitating handwriting at the paragraph level that also works for unseen writing styles. Therefore, we introduce a modified latent diffusion model that enriches the encoder-decoder mechanism with specialized loss functions that explicitly preserve the style and content. We enhance the attention mechanism of the diffusion model with adaptive 2D positional encoding and the conditioning mechanism to work with two modalities simultaneously: a style image and the target text. This significantly improves the realism of the generated handwriting. We set a new benchmark in our comprehensive evaluation, achieving 61 % mAP and 56 % top-1 accuracy in style preservation, significantly outperforming the previous best method (37 % mAP, 30 % top-1). We are making our code publicly available for reproducibility, supporting research in this area and research into potential countermeasures: https://github.com/M4rt1nM4yr/paragraph_handwriting_imitation_ldmKeywords
All Related Versions
Funding Information
- Deutsche Forschungsgemeinschaft (416910787)
This publication has 37 references indexed in Scilit:
- StylusAI: Stylistic Adaptation for Robust German Handwritten Text Generation2024
- Handwritten Text Generation with Character-Specific Encoding for Style Imitation2023
- Improving Handwritten OCR with Training Samples Generated by Glyph Conditional Denoising Diffusion Probabilistic Model2023
- WordStylist: Styled Verbatim Handwritten Text Generation with Latent Diffusion Models2023
- Beyond Human Forgeries: An Investigation into Detecting Diffusion-Generated Handwriting2023
- SmartPatch: Improving Handwritten Word Imitation with Patch Discriminators2021
- Transformer for Handwritten Text Recognition Using Bidirectional Post-decoding2021
- Page Layout Analysis System for Unconstrained Historic Documents2021
- GANwriting: Content-Conditioned Generation of Styled Handwritten Word Images2020
- Spatio-Temporal Handwriting Imitation2020