docTR vs GOT-OCR 2.0
Pick docTR when you need word-level text with coordinates from invoices and receipts, and you want an Apache-2.0 library you can train yourself. Pick GOT-OCR 2.0 when pages contain formulas, tables, sheet music or chemical structures, and you need Markdown or LaTeX output. The main split is output: docTR returns words and lines only, while GOT-OCR 2.0 reads structured content.
docTRmindee/doctr | GOT-OCR 2.0stepfun/got-ocr-2 | |
|---|---|---|
| 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 | Formatted text, formulas and charts |
| Inputs | PDF, images | images |
| Languages | Mainly Latin scripts | Chinese, English |
| Max pages per request | 500 | 100 |
| 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 need a nested page, block, line and word structure with coordinates as JSON.
- You want to choose your own detection and recognition architectures, with straight or rotated boxes.
- You want a permissive Apache-2.0 licence with ready Docker images and a key information extraction predictor.
Choose GOT-OCR 2.0 if
- Your pages contain formulas, tables, charts, sheet music or chemical structures that need LaTeX, Markdown, TikZ, SMILES or kern output.
- You want to run OCR on one region of a page, guided by box coordinates or color.
- You work with English and Chinese documents, and want multi-page OCR through Hugging Face Transformers with batched inference.
Key differences
| docTR | GOT-OCR 2.0 | |
|---|---|---|
| Licence | Apache-2.0 | Code Apache-2.0; training data CC BY-NC 4.0 |
| How you run it | Python library on PyTorch, with Docker images | Self-hosted 580M-parameter model, available in Hugging Face Transformers |
| Hardware | CPU or NVIDIA GPU; GPU Docker images need CUDA 12.2 or newer on the host | CUDA 11.8 and PyTorch 2.0.1 per the README; CPU users are pointed to a llama.cpp port |
| Output formats | JSON, plain text, bounding boxes | Plain text, Markdown, LaTeX, TikZ, SMILES, kern |
| Tables and formulas | No table, formula or Markdown output; words and lines only | Reads tables, formulas, charts and sheet music |
| Price | Free, self-hosted (you pay for compute) | Free, self-hosted (you pay for compute) |
| Known failure | Cropping images leads to poorer results (issue #2007); split-crop merging can misjoin repeated characters (issue #2229) | Output can loop characters midway (issue #226); returns wrong text on images with no text (issue #235); format mode is much worse than plain OCR mode (issue #317) |
Sources
What each one is
docTR
Open-source OCR library from Mindee with separate text detection and recognition models.
docTR detailsGOT-OCR 2.0
Unified OCR model that reads plain text, tables, formulas, sheet music and charts.
GOT-OCR 2.0 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": ["stepfun/got-ocr-2"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
docTR alternativesGOT-OCR 2.0 alternativesBest OCR models in 2026