DiffusionPen: Towards Controlling the Style of Handwritten Text Generation

Konstantina Nikolaidou, G. Retsinas, Giorgos Sfikas, M. Liwicki
2/14/2026

No official code found. Best implementation: koninik/DiffusionPen (103 stars, MIT, PyTorch, last commit 2024-10-24).

Abstract

Handwritten Text Generation (HTG) conditioned on text and style is a challenging task due to the variability of inter-user characteristics and the unlimited combinations of characters that form new words unseen during training. Diffusion Models have recently shown promising results in HTG but still remain under-explored. We present DiffusionPen (DiffPen), a 5-shot style handwritten text generation approach based on Latent Diffusion Models. By utilizing a hybrid style extractor that combines metric learning and classification, our approach manages to capture both textual and stylistic characteristics of seen and unseen words and styles, generating realistic handwritten samples. Moreover, we explore several variation strategies of the data with multi-style mixtures and noisy embeddings, enhancing the robustness and diversity of the generated data. Extensive experiments using IAM offline handwriting database show that our method outperforms existing methods qualitatively and quantitatively, and its additional generated data can improve the performance of Handwriting Text Recognition (HTR) systems. The code is available at: https://github.com/koninik/DiffusionPen.

View on arXivView PDF

Code Implementations(1)

PyTorchMIT

Official PyTorch Implementation of "DiffusionPen: Towards Controlling the Style of Handwritten Text Generation" - ECCV 2024

10324PythonJul 10, 20241 years agoMIT
diffusion-modelseccv2024handwriting-recognitionhandwritten-text-generationpytorch+1 more

Similar Papers

Cite this paper

@article{nikolaidou2026diffusionpen,
  title  = {DiffusionPen: Towards Controlling the Style of Handwritten Text Generation},
  author = {Konstantina Nikolaidou and G. Retsinas and Giorgos Sfikas and M. Liwicki},
  year   = {2026},
  eprint = {2409.06065},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2409.06065},
  journal = {ECCV 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2409.06065.svg)](https://codeofpaper.com/paper/2409.06065)

Discussion