docTR vs Granite Docling
Pick docTR when you need word-level text with coordinates from invoices and receipts, and you plan to feed that into your own extraction or train your own models. Pick Granite Docling when you need whole documents converted to Markdown, HTML or LaTeX, especially English PDFs with tables, code and equations. The main split is output: docTR returns words and lines only, while Granite Docling returns document structure.
docTRmindee/doctr | Granite Doclingibm/granite-docling | |
|---|---|---|
| Type | Open source | Open source |
| Price | 1 credit / page | 1 credit / page |
| Per 1,000 pages | $1.00 | $1.00 |
| Typical speed | 0.9 s / page | 1.5 s / page |
| Best for | Word-level OCR with positions | Small-model document conversion |
| Inputs | PDF, images | PDF, images |
| Languages | Mainly Latin scripts | English, experimental CJK and Arabic |
| Max pages per request | 500 | 500 |
| Tables | No | ✓ Yes |
| Handwriting | No | No |
| Math | No | ✓ Yes |
| Bounding boxes | ✓ Yes | ✓ Yes |
| Confidence | ✓ Yes | No |
| Forms | No | No |
| Multilingual | No | No |
| On OCRRouter | Available | Available |
Prices are what you pay on OCRRouter. Speed is the provider's typical figure, not a benchmark we ran.
Which to choose
Choose docTR if
- You want nested page, block, line and word output with coordinates as JSON, with straight or rotated boxes.
- You want to choose your own detection and recognition architectures and train your own models in Python.
- You want ready Docker images, a Hugging Face Spaces demo and a key information extraction predictor under Apache-2.0.
Choose Granite Docling if
- You need Markdown, HTML, LaTeX or DocTags output from a full page, including tables, code and equations.
- You want a 258M-parameter model that runs inside Docling on a CPU or a small GPU.
- You work with English PDFs and want published numbers: table TEDS 0.97 on FinTabNet, equation F1 0.968 and code F1 0.988.
Key differences
| docTR | Granite Docling | |
|---|---|---|
| What it is | Two-stage text detection and recognition library from Mindee, on PyTorch | 258M-parameter document conversion VLM from IBM that outputs DocTags for Docling |
| Licence and price | Apache-2.0, free, self-hosted (you pay for compute) | Apache-2.0, free, self-hosted (you pay for compute) |
| Output formats | JSON, plain text, bounding boxes | DocTags, Markdown, HTML, LaTeX, bounding boxes |
| Tables and formulas | No table, formula or Markdown output | Table TEDS 0.97 on FinTabNet at 150dpi and equation F1 0.968, both reported by the authors |
| Hardware | CPU or NVIDIA GPU; GPU Docker images need CUDA 12.2 or newer on the host | CPU or small GPU; on GPUs without bfloat16 such as T4, it may output only exclamation marks unless run in float32 |
| Languages | Not published | English primary; Japanese, Arabic and Chinese are experimental |
| Known failures | Split-crop merging misjoins readings across repeated characters (issue #2229); cropping images gives poorer results (issue #2007); ONNX export of MASTER truncates decoding steps (issue #2224) | Gets stuck in repetitive loops on page headings and invoices; vLLM can fail with a wte attribute error; Ollama on CPU can hallucinate from FP16 overflow |
Sources
- docTR GitHub README
- Issue #2229
- Issue #2007
- Granite-Docling model card
- HF discussion #24 repetition
- Ollama issue #12355
What each one is
docTR
Open-source OCR library from Mindee with separate text detection and recognition models.
docTR detailsGranite Docling
Compact IBM vision model that converts pages to DocTags for the Docling pipeline.
Granite Docling detailsTry both on your own file
Run the file once with each model and compare the output.
Use one, fall back to the other
{"model": "mindee/doctr","fallbacks": ["ibm/granite-docling"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
docTR alternativesGranite Docling alternativesBest OCR models in 2026