Skip to main content
Back

Ends Soon: Get 20% off all AlphaSignal Pro subscriptions. Subscribe here.

Datalab's Indra OCR Parses 49 Pages per Second on a CPU

Datalab's new 1M-parameter Indra OCR reads 49 pages per second on CPU, outpacing Tesseract and PaddleOCR while keeping layout and reading order intact.

Pro

  • Datalab released Indra OCR, a 1M-parameter CPU OCR model under Apache 2.0.
  • Hits 49 pages/sec on 32 cores, 11-17x faster than Tesseract and PaddleOCR.
  • Scores 41.3 on OmniParseBench text vs 35.8 PaddleOCR and 19.3 Tesseract.
  • Outputs markdown, plain text, or JSON with layout blocks, boxes, and reading order.
  • Only 18 MB of ONNX weights, no PyTorch; weights on Hugging Face.
  • Weak on handwriting, complex tables, degraded scans, and non-supported scripts.

Datalab has released Indra OCR, a compact document-conversion stack that runs on CPUs and turns PDFs or images into Markdown, plain text, or structured JSON. Its output can include line-level bounding boxes, labeled layout blocks, reading order, and confidence scores.

Modern document parsers often use vision-language models that render each page as an image and generate text token by token, increasing memory use and latency. Indra targets high-volume ingestion jobs such as preparing documents for retrieval-augmented generation, indexing scanned archives, and routing difficult pages to larger models.

The repository code uses the Apache 2.0 license. The model weights use a modified OpenRAIL-M license that permits free research use and free use by startups with less than $20 million in funding or revenue. Organizations outside those terms should review the model license before deployment.

49 pages per second, under test

On a 32-core AMD EPYC system, Datalab reports processing 300 OmniParseBench pages at 49 pages per second. A 4-vCPU configuration averaged roughly 230 milliseconds of latency per page.

Datalab’s reported benchmark results
Metric Result Conditions
Throughput 49 pages per second 32 CPU cores, 300 OmniParseBench pages
Page latency About 230 ms 4 vCPUs
Relative throughput 11 to 17 times faster Compared with Tesseract and PaddleOCR on the same workload
Printed-text score 41.3 PaddleOCR PP-OCRv6 Small scored 35.8; Tesseract 5 scored 19.3
Aggregate score 62.1 Mean across text, tables, and layout
Aggregate with math 66.8 --math enabled, with LaTeX output for equation lines
Bar chart comparing Indra OCR throughput with Tesseract, PaddleOCR, and PP-StructureV3
Datalab’s CPU throughput comparison for Indra and competing OCR pipelines.

PP-StructureV3 runs layout, table, and formula models in addition to text recognition, so its broader workload partly explains its lower throughput. Indra’s 62.1 aggregate score slightly exceeds Datalab’s result for PP-StructureV3, although one competing engine did not complete every evaluation section.

Indra’s automatic mode can reuse embedded digital text, which improves results on PDFs with a valid text layer. Datalab reports lower accuracy on image-only files, so the benchmark should not be read as a pure visual-recognition comparison for every page.

Inside the 18 MB stack

The downloadable ONNX artifacts total roughly 18 MB. The package runs with ONNX Runtime, OpenCV, and pypdfium2, with no PyTorch dependency. Its main processing path divides document parsing into four stages:

  1. Line detection: Locates text lines on the rendered page.
  2. Text recognition: Uses connectionist temporal classification, or CTC, to predict character sequences and collapse repeated or blank predictions into text.
  3. Layout classification: Labels regions such as text, section headers, tables, captions, footnotes, and forms.
  4. Reading order: Sequences detected blocks so downstream systems receive content in document order.

Automatic extraction inspects a PDF’s existing text layer and uses it where it passes validation, then applies OCR to the remaining content. A single page can therefore combine embedded digital text with recognized text from scanned regions.

Batch conversion uses multiple single-threaded worker processes, with one worker per core by default. The command-line interface and Python’s convert_many function distribute pages across those workers, allowing one long PDF to use several cores.

Structure survives extraction

Indra supports three output formats suited to different stages of an ingestion pipeline:

  • Markdown: Preserves document flow and represents tables with inline HTML.
  • Plain text: Provides lightweight output for search, indexing, and simple processing.
  • JSON: Includes labeled blocks, line data, pixel-space bounding boxes, reading order, and confidence scores.

The command-line interface writes Markdown to standard output by default, supports explicit format selection, and can process multiple files into an output directory:

pip install indra-ocr

indra-ocr paper.pdf
indra-ocr scan.png --format json
indra-ocr *.pdf --out results/
indra-ocr equations.pdf --math

Where the small model runs out

On OmniParseBench’s handwriting split, Indra scores roughly 8%; degraded historical scans score about 20%. Complex tables with merged cells or wrapped text can produce misaligned rows, and unusually large pages can also fail.

The recognizer covers Latin, Cyrillic, Greek, Devanagari, Bengali, and Chinese scripts. Arabic, Hebrew, Thai, Japanese kana, and Korean Hangul require a usable embedded PDF text layer. Datalab recommends its larger hosted Chandra model for handwriting, complex tables, and large pages.

A fast first pass for retrieval

RAG pipelines need searchable text, stable reading order, and source coordinates for chunking and citations. For clean printed PDFs and image scans, Indra provides those artifacts with low memory requirements and reported CPU throughput well above established OCR engines. A tiered document pipeline can process routine pages with Indra and route low-confidence pages, handwriting, or difficult tables to a larger model.