PubMed-OCR is an OCR-centric corpus of scientific articles derived from PubMed Central Open Access PDFs. Each page is rendered to an image and annotated with Google Cloud Vision OCR, released in a compact JSON schema with word-, line-, and paragraph-level bounding boxes.
Scale (release):
This dataset is intended to support layout-aware modeling, coordinate-grounded QA, and evaluation of OCR-dependent pipelines on scientific documents.
{basename, page})license field)PubMed-OCR is suitable for:
Each row corresponds to a single page. Key identifiers:
basename: page group identifier (article-level)page: page index within the articleocr_json is a JSON string containing OCR outputs with bounding boxes in pixel coordinates for the rendered page image.
Example (schema sketch; fields may include additional metadata):
{
"image": {"width": 1275, "height": 1650, "dpi": 150},
"text": {
"words": [{"text": "Introduction", "bbox": [74, 132, 210, 156]}],
"lines": [{"text": "Introduction", "bbox": [74, 130, 612, 160]}],
"paragraphs": [{"text": "…", "bbox": [70, 120, 1180, 420]}]
}
}basename (string): article/page group identifier.page (int32): page index within the PDF/article.license (string): the source article’s license (e.g., cc-by-4.0, cc-by-nc-4.0, …).pmid (string): PubMed ID when available.accession_id (string): accession identifier (e.g., PMCID or internal ID).article_citation (string): a citation string for the source article.pdf_bytes (binary): raw PDF bytes when redistribution is permitted; may be empty/null otherwise.ocr_json (string): OCR output JSON (see above).This release is provided as a single split (train) because it is primarily a corpus.
For benchmarking, consider constructing evaluation splits that reduce leakage, e.g.:
Scientific PDFs are dense (formulas, tables, multi-column layouts). Many PMCOA datasets rely on PDF/XML alignment, which can miss scanned pages or inherit parser noise. PubMed-OCR provides OCR-native supervision directly from rendered page images, enabling OCR-dependent evaluation and layout-aware learning without PDF/XML alignment.
High-level pipeline:
document_text_detection on page images.[x1, y1, x3, y3].ocr_json (+ pdf_bytes where permitted).The source texts were authored by scientific article authors and published via journals hosted in PubMed Central Open Access.
Annotations are machine-generated via Google Cloud Vision OCR.
The OCR engine is the annotator. No manual annotation was performed in this release.
Scientific articles can contain author names, affiliations, acknowledgements, emails, and citations. Content is drawn from publicly available PMCOA articles; no additional anonymization is applied.
This dataset contains content derived from PMCOA articles.
license field.pdf_bytes is present, it is provided only where redistribution is permitted.If you use PubMed-OCR, please cite:
@article{heidenreich2025pubmedocr,
title={PubMed-OCR: PMC Open Access OCR Annotations},
author={Heidenreich, Hunter and Getachew, Yosheb and Dinica, Olivia and Elliott, Ben},
journal={arXiv preprint arXiv:2601.11425},
year={2025}
}from datasets import load_dataset
import json
ds = load_dataset("rootsautomation/pubmed-ocr", split="train")
row = ds[0]
ocr = json.loads(row["ocr_json"])
words = ocr["text"]["words"]For large-scale iteration, consider streaming:
ds = load_dataset("rootsautomation/pubmed-ocr", split="train", streaming=True)
for row in ds:
ocr = json.loads(row["ocr_json"])
...