OCRRouter

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/doctrGOT-OCR 2.0stepfun/got-ocr-2
TypeOpen sourceOpen source
Price1 credit / page1 credit / page
Per 1,000 pages$1.00$1.00
Typical speed0.9 s / page1.5 s / page
Best forWord-level OCR with positionsFormatted text, formulas and charts
InputsPDF, imagesimages
LanguagesMainly Latin scriptsChinese, English
Max pages per request500100
TablesNo✓ Yes
HandwritingNoNo
MathNo✓ Yes
Bounding boxes✓ Yes✓ Yes
Confidence✓ YesNo
FormsNoNo
MultilingualNoNo
On OCRRouterAvailableAvailable

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

docTRGOT-OCR 2.0
LicenceApache-2.0Code Apache-2.0; training data CC BY-NC 4.0
How you run itPython library on PyTorch, with Docker imagesSelf-hosted 580M-parameter model, available in Hugging Face Transformers
HardwareCPU or NVIDIA GPU; GPU Docker images need CUDA 12.2 or newer on the hostCUDA 11.8 and PyTorch 2.0.1 per the README; CPU users are pointed to a llama.cpp port
Output formatsJSON, plain text, bounding boxesPlain text, Markdown, LaTeX, TikZ, SMILES, kern
Tables and formulasNo table, formula or Markdown output; words and lines onlyReads tables, formulas, charts and sheet music
PriceFree, self-hosted (you pay for compute)Free, self-hosted (you pay for compute)
Known failureCropping 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 details

GOT-OCR 2.0

Unified OCR model that reads plain text, tables, formulas, sheet music and charts.

GOT-OCR 2.0 details

Try both on your own file

Run the file once with each model and compare the output.

PDF, PNG, JPG, WebP, HEIC. Up to 20 MB each, 10 files.No file?

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