Spaces:
Running on Zero
Running on Zero
File size: 2,647 Bytes
a521435 6426e97 a521435 6426e97 a521435 6426e97 61541f6 6426e97 61541f6 6426e97 61541f6 6426e97 61541f6 6426e97 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | ---
title: Indra OCR
emoji: 📄
colorFrom: gray
colorTo: green
sdk: gradio
sdk_version: 6.30.0
app_file: app.py
short_description: 1M-param ONNX OCR that turns PDFs and images into markdown
python_version: "3.12"
---
# Indra OCR
A demo of **[datalab-to/indra-ocr](https://huggingface.co/datalab-to/indra-ocr)**, a 1M-parameter ONNX OCR
model that turns PDFs and images into markdown, plain text, or JSON — with a bounding box for every text
line and every layout block (headings, lists, tables, captions, footnotes...), in reading order. It runs
entirely on CPU (about 76 MB of ONNX models and language models, no PyTorch), at about 44 pages per second on 32 cores.
- Digital PDFs go through their own text layer where it passes Indra's checks (any script); scans and
images go through the OCR models: 80+ languages, including Chinese, Japanese, Korean, Arabic, Hebrew, the Indic scripts and Thai, and handwriting.
- Pages turned upside down or sideways are turned upright first, and tilts up to 45 degrees are straightened.
- The preview shows the detected layout: faint blue boxes are text lines, colored labeled boxes are
layout blocks.
## Examples
The example pages are OmniParseBench pages that the model card and the README showcase. The pages come from
[OmniParseBench](https://github.com/datalab-to/omni_parse_bench):
- `multi_column.png` and `rotated_letter.png` derive from [olmOCR-bench](https://huggingface.co/datasets/allenai/olmOCR-bench)
(Allen Institute for AI), used under the Open Data Commons Attribution License v1.0 (ODC-BY 1.0).
Credit: Poznanski J. et al. (2025). olmOCR: Unlocking Trillions of Tokens in PDFs with Vision Language
Models. arXiv:2502.18443.
- `table_pmc.png` is a PubMed Central page (OmniParseBench `tables_derived`, `pmc-LICENSE.txt`).
- `chinese_essay.png` comes from [FinePDFs](https://huggingface.co/datasets/HuggingFaceFW/finepdfs)
(OmniParseBench `multiling_finepdfs`), used under ODC-BY 1.0.
- `handwriting_letter.png`, `korean_letter.png`, `thai_calendar.png` and `tilted_memo.png` are OmniParseBench pages
(`synth_copies`, `multiling_finepdfs` and `docparsing_images`; the memo is turned 30 degrees). Their sources and licenses are in
OmniParseBench's [`licenses/`](https://huggingface.co/datasets/datalab-to/omni_parse_bench/tree/main/licenses) folder.
## License
The `indra-ocr` code is Apache-2.0. The model weights use a modified OpenRAIL-M license — free for
research, personal use, and startups under $20M funding/revenue; see the
[model card](https://huggingface.co/datalab-to/indra-ocr) for the terms and Datalab's pricing page for
broader commercial licensing. |