Decoder Pre-Training with only Text for Scene Text Recognition

Shuai Zhao, Yongkun Du, Zhineng Chen, Yu-Gang Jiang
8/11/2024
cs.CV

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

Abstract

Scene text recognition (STR) pre-training methods have achieved remarkable progress, primarily relying on synthetic datasets. However, the domain gap between synthetic and real images poses a challenge in acquiring feature representations that align well with images on real scenes, thereby limiting the performance of these methods. We note that vision-language models like CLIP, pre-trained on extensive real image-text pairs, effectively align images and text in a unified embedding space, suggesting the potential to derive the representations of real images from text alone. Building upon this premise, we introduce a novel method named Decoder Pre-training with only text for STR (DPTR). DPTR treats text embeddings produced by the CLIP text encoder as pseudo visual embeddings and uses them to pre-train the decoder. An Offline Randomized Perturbation (ORP) strategy is introduced. It enriches the diversity of text embeddings by incorporating natural image embeddings extracted from the CLIP image encoder, effectively directing the decoder to acquire the potential representations of real images. In addition, we introduce a Feature Merge Unit (FMU) that guides the extracted visual embeddings focusing on the character foreground within the text image, thereby enabling the pre-trained decoder to work more efficiently and accurately. Extensive experiments across various STR decoders and language recognition tasks underscore the broad applicability and remarkable performance of DPTR, providing a novel insight for STR pre-training. Code is available at 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,445143PythonMay 31, 20246 months agoApache-2.0
chineseocrdocument-analysisdocument-parsingdocument-processingocr+3 more

Similar Papers

Cite this paper

@article{zhao2024decoder,
  title  = {Decoder Pre-Training with only Text for Scene Text Recognition},
  author = {Shuai Zhao and Yongkun Du and Zhineng Chen and Yu-Gang Jiang},
  year   = {2024},
  eprint = {2408.05706},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2408.05706v1}
}

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

Discussion