跳到正文

正在自动登录…

← 返回项目列表

datalab-to/indra

OCR文字识别PDF转Markdown图像转文本

Indra OCR 是一个专为CPU设计的高效OCR模型,可将PDF和图像转换为Markdown、文本或带坐标的JSON,支持80多种语言、手写和任意角度的页面。适合需要快速、轻量级文档处理且不依赖GPU的用户。

AI 中文解读 · 根据仓库描述与 README 生成 · 2026/10/21 22:01:46 · 查看原文

值得看Python应用与服务
累计 Stars
917
当前热度
未达当前门槛
仓库创建时间
打开 GitHub ↗项目网站 ↗

选用指南

AI 根据 README 整理 · 2026/10/21 22:01:46

使用方式

通过命令行或Python库使用,可输出Markdown、文本或JSON格式,并提供本地Web查看器。

查看 README 依据
Get started with **$5 in free credits** - [sign up](https://www.datalab.to/?utm_source=gh-indra) - or try Chandra in our [public playground](https://www.datalab.to/playground?utm_source=gh-indra). ## Quickstart ```shell pip install indra-ocr indra-ocr paper.pdf # markdown to stdout indra-ocr *.pdf --out results/ # one .md per input, all cores indra-ocr scan.png --format json # lines, boxes, layout blocks, confidences indra-ocr-viewer # local web viewer on http://localhost:8765 ```
Python 3.10 or newer, tested on Linux (x86_64 and aarch64, Python 3.10 to 3.13) and macOS (Apple silicon). It installs ONNX Runtime, OpenCV and pypdfium2, and no PyTorch. The models download from Hugging Face on the first run and are cached. To use a local copy, set `INDRA_OCR_MODEL_DIR` or pass `--model-dir`. # Usage ## CLI ```shell indra-ocr paper.pdf # markdown to stdout indra-ocr *.pdf --out results/ # one .md per input indra-ocr scan.png --format json # lines, boxes, layout blocks, confidences, timings
indra-ocr-viewer --port 8765 # open http://localhost:8765 ``` A local web viewer: drop in a PDF or an image, and each page shows its lines, layout blocks and reading order over the page, with the rendered markdown, the markdown source, the lines with their confidences, the JSON output and the time of each stage. The pipeline options (text layer or OCR, math, headers and footers, reading order, OCR of text inside images, dpi, page limit) are set in the page, and lines, blocks, block labels and reading order can each be shown or hidden. Files stay on your machine. `--tesseract`
部署要求

需要Python 3.10或更高版本,支持Linux和macOS(Apple silicon),首次运行需从Hugging Face下载约76MB模型。

查看 README 依据
The first run downloads the models (about 76 MB) from [Hugging Face](https://huggingface.co/datalab-to/indra-ocr). ## Examples Real Indra OCR outputs on OmniParseBench pages. Colored boxes are layout blocks with their label, faint blue boxes are lines, drawn from the JSON output with no edits. <table> <tr> <td width="50%"><img src="assets/examples/handwriting_letter.png"/><br/><sub>A handwritten letter in cursive: Indra OCR finds every line and reads the body of the letter.</sub></td>
Python 3.10 or newer, tested on Linux (x86_64 and aarch64, Python 3.10 to 3.13) and macOS (Apple silicon). It installs ONNX Runtime, OpenCV and pypdfium2, and no PyTorch. The models download from Hugging Face on the first run and are cached. To use a local copy, set `INDRA_OCR_MODEL_DIR` or pass `--model-dir`. # Usage ## CLI ```shell indra-ocr paper.pdf # markdown to stdout indra-ocr *.pdf --out results/ # one .md per input indra-ocr scan.png --format json # lines, boxes, layout blocks, confidences, timings
已知限制

复杂表格、手写识别、非支持脚本的OCR以及低分辨率扫描的识别效果有限。

查看 README 依据
- **Complex tables.** Tables with merged or spanning cells, cell text that wraps over several lines, nested headers, or no ruling lines can come out with cells in the wrong rows or columns. Simple grid tables read well. - **Handwriting.** Handwritten pages read, but not well: 25.2% on the OmniParseBench handwriting tests, and about a third of the words on held-out handwritten pages. Cursive and faint pencil read worst.
- **Scripts outside the OCR list.** Syriac, Tibetan, Mongolian, Santali, Meitei and other scripts not listed under [Languages](#languages) work only through a digital PDF's text layer. Khmer and Malayalam OCR are fair (65 to 71 on OmniParseBench). Written Cantonese characters (嘅 咗 冇) are not in the Chinese recognizer.
- **Latin languages with many diacritics.** Some of them (Kurmanji, Czech, Lithuanian, Icelandic, Turkish, Slovak) read less well: the recognizer sometimes writes a close diacritic instead of the right one (ñ for ň, ú for ů, é for ė). English, French, German and Spanish are not affected. - **Degraded scans.** Old, faded or low-resolution scans read poorly (29.5% on the OmniParseBench degraded-scan tests). Also: - Math comes out as plain text unless `--math` is on (see [Math](#math)).

README

正在加载 README…

收录信息

仓库创建时间
2026/10/13 19:07:11
首次达标收录
2026/10/14 09:30:57
统计更新时间
2026/10/22 19:00:54

按创建时长与累计 Stars 判断等级。首次达标收录后,即使未达当前门槛仍保留;累计 Stars 和仓库状态会定期更新。确认只有 README 及辅助文件的仓库会停止公开。

模型评估

值得看加权总分 4.3 / 5

新颖度
3.9
实用价值
5.0
成熟度
4.4
实质含量
3.8

由 Jev 模型根据仓库描述与 README 评估,2026/10/21 09:31:14 生成。评分仅供参考,不是代码、安全或许可证审查;热度等级另按创建时长与累计 Stars 计算。

仓库信息

最近推送
2026/10/22 18:14:08
许可证标识
Apache-2.0
Fork 数
93
当前状态
未归档

收录记录

按创建时长与累计 Stars 首次收录:小火
首次发现项目