MDiff4STR: Mask Diffusion Model for Scene Text Recognition

Yongkun Du, Miaomiao Zhao, Songlin Fan, Zhineng Chen, Caiyan Jia +1 more
12/1/2025
cs.CV

Official code: Topdu/OpenOCR (1,339 stars, Apache-2.0, last commit 2026-04-23).

Abstract

Mask Diffusion Models (MDMs) have recently emerged as a promising alternative to auto-regressive models (ARMs) for vision-language tasks, owing to their flexible balance of efficiency and accuracy. In this paper, for the first time, we introduce MDMs into the Scene Text Recognition (STR) task. We show that vanilla MDM lags behind ARMs in terms of accuracy, although it improves recognition efficiency. To bridge this gap, we propose MDiff4STR, a Mask Diffusion model enhanced with two key improvement strategies tailored for STR. Specifically, we identify two key challenges in applying MDMs to STR: noising gap between training and inference, and overconfident predictions during inference. Both significantly hinder the performance of MDMs. To mitigate the first issue, we develop six noising strategies that better align training with inference behavior. For the second, we propose a token-replacement noise mechanism that provides a non-mask noise type, encouraging the model to reconsider and revise overly confident but incorrect predictions. We conduct extensive evaluations of MDiff4STR on both standard and challenging STR benchmarks, covering diverse scenarios including irregular, artistic, occluded, and Chinese text, as well as whether the use of pretraining. Across these settings, MDiff4STR consistently outperforms popular STR models, surpassing state-of-the-art ARMs in accuracy, while maintaining fast inference with only three denoising steps. Code: https://github.com/Topdu/OpenOCR.

View on arXivView PDF

Code Implementations(1)

Topdu/OpenOCROfficial100%
Apache-2.0

OpenOCR: An Open-Source Toolkit for General-OCR Research and Applications, integrates a unified training and evaluation benchmark, commercial-grade OCR and Document Parsing systems, and faithful reproductions of the core implementations from a wide range of academic papers.

1,339125PythonMay 31, 20246 months agoApache-2.0
chineseocrdocument-analysisdocument-parsingdocument-processingocr+3 more

Similar Papers

Cite this paper

@article{du2025mdiffstr,
  title  = {MDiff4STR: Mask Diffusion Model for Scene Text Recognition},
  author = {Yongkun Du and Miaomiao Zhao and Songlin Fan and Zhineng Chen and Caiyan Jia and Yu-Gang Jiang},
  year   = {2025},
  eprint = {2512.01422},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2512.01422v1}
}

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/2512.01422.svg)](https://codeofpaper.com/paper/2512.01422)

Discussion