Introduction
While Optical Character Recognition (OCR) has matured significantly for scanned documents and natural scene text, "screen images"—such as digital figures, charts, and diagrams—present distinct challenges. In academic publishing, vital information is often embedded in non-searchable pixel formats within figures. To unlock this data, precise text localization is a prerequisite. However, training robust detection models requires vast amounts of labeled data, which is traditionally expensive and time-consuming to produce manually. This work addresses these hurdles by introducing a specialized Convolutional Neural Network (CNN) and a massive, automatically labeled dataset.
Automated Ground Truth Generation
The core innovation of this project lies in its data acquisition pipeline. Rather than relying on manual annotation, the author leverages the internal structure of PDF files. Because PDFs often store text as separate metadata or vector layers, it is possible to programmatically determine the exact coordinates of text appearing over figures. By "scraping" these coordinates, the author transformed a massive library of research papers into a self-labeling training set, generating "pixel masks" that serve as ground truth for the neural network.
Model Architecture and Implementation
The detection task is framed as a semantic segmentation problem. The model is implemented using the Darknet framework, an open-source neural network library written in C and CUDA, known for its efficiency and role as the foundation for the YOLO (You Only Look Once) object detection models.
Instead of outputting discrete bounding boxes, the network generates a 64 × 64 pixel heatmap. Each pixel in this heatmap represents the probability of text presence at that specific location in the input image. This approach provides a nuanced understanding of text density, which is particularly advantageous for complex academic figures where text may be rotated, tightly packed, or overlapping with graphical elements.
The Dataset
A primary contribution of this work is the release of a significant new resource for the research community. The dataset consists of approximately 500,000 labeled images derived from a corpus of over one million papers sourced from arXiv and the ACL Anthology. By focusing on digital renders rather than physical scans, the dataset captures the specific visual characteristics of screen-rendered text—such as aliasing, high contrast, and specific digital fonts—enabling models to generalize better to software-based environments.
Results and Utility
As a software-focused contribution, the project emphasizes scalability and accessibility. The author demonstrated an end-to-end workflow capable of processing millions of documents to produce high-quality training data. The public release of the scripts and the dataset provides a foundational toolset for researchers looking to build more robust OCR systems for digital documents.
Limitations and Future Directions
Despite its utility, the current implementation has limitations. The 64 × 64 heatmap resolution may be too coarse for extremely dense documents or very small text, suggesting a need for future refinement or upscaling techniques. Additionally, the quality of the training data is inherently tied to the accuracy of the underlying PDF extraction tools; noisy or misaligned metadata in source PDFs can lead to artifacts in the generated masks. Future work could explore the model's performance on other screen-based domains, such as user interface screenshots or video game frames.
Summary updated