General OCR Theory: Towards OCR-2.0 via a Unified End-to-end Model

Haoran Wei, Chenglong Liu, Jinyue Chen, Jia Wang, Lingyu Kong, Yanming Xu, Zheng Ge, Liang Zhao, Jianjian Sun, Yuang Peng, Chunrui Han, Xiangyu Zhang · DOI

Abstract

Traditional Optical Character Recognition (OCR) systems, categorized as "OCR-1.0," rely on complex, multi-modular pipelines that are prone to error propagation and high maintenance costs. This paper introduces General OCR Theory (GOT), a paradigm shift toward OCR-2.0—a unified, end-to-end architecture designed to handle all artificial optical signals. We present the GOT model, a 580M-parameter encoder-decoder system that compresses high-resolution images into efficient token representations. GOT demonstrates superior performance across diverse tasks, including document parsing, scene text recognition, and specialized signal decoding (e.g., sheet music and molecular formulas), frequently outperforming Large Vision Language Models (LVLMs) with significantly higher parameter counts.

Introduction: From OCR-1.0 to OCR-2.0

For decades, OCR has been treated as a multi-stage problem involving detection, cropping, and recognition. While effective for specific domains, these "OCR-1.0" systems require different models for different tasks (e.g., tables vs. scene text) and are difficult to optimize globally.

Recent advancements in Large Vision Language Models (LVLMs) like LLaVA or Qwen-VL have shown promise in OCR tasks. However, these models are often inefficient for pure perception; they utilize thousands of image tokens for a single page and prioritize reasoning over raw character accuracy. We propose OCR-2.0 as a dedicated, end-to-end alternative that is versatile, computationally cheap, and capable of processing the full spectrum of man-made optical signals.

The GOT Architecture

The GOT model is built on an efficient encoder-decoder framework totaling approximately 580 million parameters.

  1. Vision Encoder: Utilizing a VitDet-based architecture (80M parameters), the encoder processes 1024x1024 input images. Crucially, it compresses these high-resolution inputs into a highly efficient 256x1024 representation, significantly reducing the token overhead compared to general-purpose LVLMs.
  2. Language Decoder: A Qwen-0.5B decoder (500M parameters) supports an 8K token context length, enabling the model to output dense, full-page structured text (Markdown, LaTeX, etc.).

Three-Stage Training Strategy

To achieve high performance with a relatively small parameter count, we employed a progressive training pipeline:

  • Stage 1 (Pre-training): Focused on pure text recognition using a lightweight temporary decoder to optimize the vision encoder.
  • Stage 2 (Joint-training): The full encoder-decoder pair was trained on a massive variety of OCR data to build general perception capabilities.
  • Stage 3 (Post-training): The model was fine-tuned for advanced features, including region-level OCR (guided by coordinates or color prompts), multi-page processing, and dynamic resolution handling.

Data Engine and Versatility

The model's robustness is derived from a massive, curated data engine covering millions of samples across various domains. Beyond standard document and scene text, GOT is trained on "General Signals"—treating complex visual structures as decodable characters.

Figure 1: Diverse scene text examples handled by the GOT model, ranging from gaming interfaces to storefronts and memes.
  • Formatted Data: Includes 1M math formulas (LaTeX), 1M molecular formulas (SMILES), and 1.2M markdown pages.
  • General Signals: 0.5M sheet music samples and 1M geometric shapes (TikZ).
  • Interactive OCR: By training on coordinate and color prompts, GOT supports "Point-and-Click" functionality, allowing users to target specific regions for recognition.

Experimental Results

GOT achieves state-of-the-art results across multiple benchmarks, proving that a specialized, smaller model can outperform generalist giants.

  • Document OCR: On the Fox benchmark, GOT achieved F1-scores of 0.972 (English) and 0.980 (Chinese), surpassing models like Vary (7B) and Qwen-VL-Max (>72B).
  • Scene Text: The model reached a BLEU score of 0.676, significantly outperforming InternVL-ChatV1.5 (0.587).
  • Chart OCR: In the number-centric PlotQA benchmark, GOT's AP@high of 0.640 nearly tripled the performance of GPT-4V (0.223).
Figure 2: GOT extends OCR capabilities to general optical signals like sheet music, converting them into structured formats.

Conclusion and Future Work

GOT represents a significant step toward a unified theory of OCR. By treating all man-made visual signals as a single decoding task, we have created a model that is both more capable and more efficient than current modular or general-purpose alternatives. Future work will focus on expanding language support beyond English and Chinese and improving the model's ability to parse highly complex, overlapping geometric diagrams.

Summary updated

BibTeX
@misc{wei2024general,
  author = {Haoran Wei and Chenglong Liu and Jinyue Chen and Jia Wang and Lingyu Kong and Yanming Xu and Zheng Ge and Liang Zhao and Jianjian Sun and Yuang Peng and Chunrui Han and Xiangyu Zhang},
  title = {{General OCR Theory: Towards OCR-2.0 via a Unified End-to-end Model}},
  year = {2024},
  eprint = {2409.01704},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2409.01704},
}
Figure