datalab-to/indra-ocr · Hugging Face

Open the original

Short summary

Indra OCR is a lightweight 1M-parameter model that converts PDFs and images to markdown, text, or JSON at 49 pages per second on CPU—roughly 12-24x faster than Tesseract and PaddleOCR. It handles layout detection, bounding boxes, and can read digital PDFs' text layers while OCRing only missing content.

  • Speed and size: Processes 49 pages/second on CPU with ~230ms latency per page, weighs just 18MB, and uses ONNX Runtime instead of PyTorch
  • Accuracy beats competitors: Scores 41.3 on OmniParseBench text (vs. PaddleOCR's 35.8 and Tesseract's 19.3) and 62.1 on headline score (vs. PaddleOCR's 58.4)
  • Layout intelligence: Detects and labels blocks (headings, tables, lists, captions, footnotes) with bounding boxes and reading order, plus optional LaTeX math recognition
  • Built for print documents: Not suitable for handwriting, complex tables, degraded scans, or scripts outside Latin/Cyrillic/Greek/Devanagari/Bengali/Chinese; Datalab offers Chandra model for these cases

Full summary

Indra OCR is a lightweight 1-million-parameter model that processes documents at 49 pages per second on CPU. It converts PDFs and images into markdown, plain text, or JSON with bounding boxes and layout information. The speed advantage is substantial—it runs 11-17x faster than Tesseract and PaddleOCR on the same hardware, with latency around 230ms per page on modest 4-core CPUs. The model fits in about 18MB, uses ONNX Runtime instead of PyTorch, and handles both scanned documents and digital PDFs with embedded text layers. On accuracy benchmarks, it scores 41.3 on OmniParseBench text (beating PaddleOCR's 35.8 and Tesseract's 19.3) and reaches 62.1 on headline detection. The tool outputs structured data—it identifies layout blocks with labels like headings, tables, captions, and footnotes, then arranges them in reading order with confidence scores. It handles multiple languages including Latin scripts, Cyrillic, Greek, Devanagari, Chinese, and CJK text. For digital PDFs, it reads the existing text layer and only OCRs missing sections. The installation is straightforward (pip install), and you can use it via command line, Python API, or a local web viewer. The code is Apache 2.0, though the model weights use a modified OpenRAIL-M license that restricts competitive commercial use without paying for a different license. Datalab also sells a managed platform running a separate model called Chandra for higher accuracy on handwriting, math, complex tables, and degraded scans. They offer batch processing for high-volume work (1B+ pages daily) and a free tier with $5 in credits. The tool is explicitly built for speed on clean printed documents rather than difficult OCR scenarios, so users needing better results on messy or handwritten material would need their paid service or the Chandra model.

Ask about this article