CREPE: Coordinate-Aware End-to-End Document Parser

Yamato Okamoto, Youngmin Baek, Geewook Kim, Ryota Nakao, DongHyun Kim, Moonbin Yim, Seunghyun Park, Bado Lee

Abstract

Recent advancements in Visual Document Understanding (VDU) have shifted toward OCR-free, end-to-end generative models due to their efficiency and robustness against error propagation. However, these models historically lack spatial awareness, failing to provide the coordinates of extracted text—a critical requirement for many real-world applications. This paper introduces CREPE (Coordinate-aware End-to-End Document Parser), a model that bridges this gap. By utilizing a multi-head architecture and a novel weakly-supervised training framework, CREPE maintains the simplicity of an OCR-free system while regaining the ability to localize information precisely on a page. Our results demonstrate state-of-the-art performance across multiple document parsing benchmarks and the ability to learn localization even from datasets lacking coordinate labels.

1. Introduction

The field of Visual Document Understanding has evolved from complex, multi-stage pipelines involving independent Optical Character Recognition (OCR) engines to streamlined "OCR-free" architectures. While models like Donut have improved speed and reduced cascading errors, they are effectively "coordinate-blind." In practical scenarios—such as sensitive data redaction, human-in-the-loop verification, and complex layout analysis—knowing the spatial $(x, y)$ coordinates of extracted text is as vital as the text itself. CREPE addresses this limitation by integrating spatial awareness directly into the generative process.

2. Methodology

CREPE is built upon a Transformer-based encoder-decoder architecture, specifically utilizing a Swin Transformer as the visual encoder and an mBART model as the decoder. The core innovation lies in its dual-purpose architecture and specialized decoding strategy.

2.1 Multi-Head Architecture

To handle both text generation and spatial localization, the model employs two distinct heads:

  1. Sequence Head: Responsible for generating text tokens and structural markers (e.g., <menu>, <price>).
  2. Coordinate Head: A specialized branch designed to predict bounding boxes (xmin, ymin, xmax, ymax) or quadrilaterals for the generated text.

2.2 Token-Triggered Decoding

Rather than predicting coordinates at every decoding step, CREPE uses a "token-triggered" mechanism. The researchers introduced a specific </ocr> token to signal the end of a text segment. When the sequence head generates this token, it triggers the coordinate head to output the spatial location for that specific segment. This approach ensures that the model has processed the entire text segment before attempting to localize it, leading to more stable and contextually aware predictions.

2.3 Weakly-Supervised Learning Framework

To overcome the scarcity of datasets with both text and coordinate labels, CREPE utilizes a weakly-supervised training framework. The model is trained on a mixture of synthetic data (containing perfect coordinate ground truth) and real-world parsing data (often containing only text). This allows the model to learn the fundamental concept of localization from synthetic examples and transfer that capability to real-world documents where explicit spatial labels are missing.

3. Experimental Setup

The model was evaluated across a diverse range of VDU benchmarks to test its versatility:

  • Document Parsing: CORD (receipts), POIE (nutrition labels), FUNSD (forms), and TrainTicket.
  • Layout Analysis: PubLayNet (academic papers).
  • Visual Question Answering: DocVQA.
  • Scene Understanding: COCO 2014 and COCO Text v2, testing the model's ability to detect objects and text in natural scenes simultaneously.
  • Pre-training: The model utilized an updated version of SynthDoG, modified to include quadrilateral coordinates for more robust pre-training.

4. Results and Discussion

CREPE achieved state-of-the-art (SOTA) or near-SOTA results across several categories, proving that spatial awareness does not come at the cost of parsing accuracy.

4.1 Parsing and Localization Performance

On the CORD dataset, CREPE achieved an F1 score of 85.0, surpassing other generative models like Donut (84.1). On the TrainTicket dataset, the model reached an F1 score of 98.4. Notably, even in weakly-supervised settings, CREPE demonstrated strong localization capabilities, achieving a localization F1 of 95.5 on CORD.

4.2 Efficiency

The addition of the coordinate head is highly efficient, increasing the parameter count by approximately 17 million. Because coordinate prediction is handled as a batch process triggered by specific tokens, the impact on inference speed is negligible compared to standard generative models.

4.3 Versatility Beyond Documents

Experiments on scene text and object detection showed that CREPE is not limited to standard documents. For instance, the model successfully identified brand logos (e.g., "Lufthansa") on aircraft while simultaneously providing the bounding box for the entire object, demonstrating its potential for general-purpose visual understanding.

5. Limitations and Future Work

Despite its successes, CREPE faces certain challenges. In weakly-supervised scenarios, predicted bounding boxes can occasionally be distorted or fail to perfectly encapsulate text, even if the center point is accurate. Additionally, the model sometimes struggles with layout ordering in documents that lack a strict reading order, such as complex academic papers. Future work will focus on improving boundary precision and handling multi-document images where outputs can occasionally become intertwined.

6. Conclusion

CREPE represents a significant step forward for OCR-free document parsers. By successfully integrating spatial coordinates into an end-to-end generative framework, it provides a viable alternative to fragmented OCR pipelines, offering the spatial precision required for professional industry applications without sacrificing the efficiency of modern Transformer architectures.

Summary updated

BibTeX
@inproceedings{okamoto2024crepe,
  author = {Yamato Okamoto and Youngmin Baek and Geewook Kim and Ryota Nakao and DongHyun Kim and Moonbin Yim and Seunghyun Park and Bado Lee},
  title = {{CREPE: Coordinate-Aware End-to-End Document Parser}},
  booktitle = {ICDAR},
  year = {2024},
}
Figure