TrOCR vs GOT-OCR 2.0
Pick TrOCR when you already have cropped single text-line images, especially English handwriting or receipt lines, or when you want to fine-tune a recognizer on your own line data. Pick GOT-OCR 2.0 when you need more than a line of text: formulas, tables, charts, sheet music or chemical structures, or English and Chinese documents. The main split is scope: TrOCR reads one line at a time and needs a separate line detector, while GOT-OCR 2.0 reads wider content and can output Markdown or LaTeX.
TrOCRmicrosoft/trocr | 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 | 1.2 s / page | 1.5 s / page |
| Best for | Handwritten text lines | Formatted text, formulas and charts |
| Inputs | images | images |
| Languages | English | Chinese, English |
| Max pages per request | 100 | 100 |
| Tables | No | ✓ Yes |
| Handwriting | ✓ Yes | No |
| Math | No | ✓ Yes |
| Bounding boxes | No | ✓ Yes |
| Confidence | No | 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 TrOCR if
- It reports 2.89 character error rate on the IAM handwriting set with the large model, per the paper.
- It ships separate checkpoints fine-tuned for handwritten (IAM), printed (SROIE) and scene text, and it loads in a few lines with Hugging Face transformers.
- The MIT license has no data restriction, and the English line recognizer is a good base for fine-tuning on custom line images.
Choose GOT-OCR 2.0 if
- It reads text, formulas, tables, charts, sheet music and geometry in one 580M-parameter model, and outputs Markdown, LaTeX, TikZ, SMILES and kern.
- Region OCR can be guided by box coordinates or color, and it supports dynamic resolution and multi-page OCR.
- It is available in Hugging Face Transformers with batched inference, and suits English and Chinese documents.
Key differences
| TrOCR | GOT-OCR 2.0 | |
|---|---|---|
| Input scope | Single text-line images only; you need a separate line detector | Documents with text, formulas, tables, charts and sheet music; multi-page OCR |
| Output formats | Plain text | Plain text, Markdown, LaTeX, TikZ, SMILES, kern |
| Licence | MIT (microsoft/unilm repository) | Code Apache-2.0; training data CC BY-NC 4.0 |
| Model size | Base 334M, large 558M parameters | 580M parameters |
| Benchmark | 2.89 CER on IAM handwriting (TrOCR-large, from the authors) | Not published |
| Languages | English-focused checkpoints; other languages need fine-tuning | English and Chinese documents |
| Known failure | Slow versus CRNN recognizers on CPU; no layout or table output | Output can loop characters midway (issue #226), return wrong text on blank images (issue #235), and format mode scores worse than plain mode (issue #317) |
Sources
- TrOCR paper (arXiv 2109.10282)
- trocr-large-handwritten model card
- microsoft/unilm repository
- GOT-OCR2.0 GitHub
- GOT-OCR 2.0 paper
- GitHub issue index
What each one is
TrOCR
Transformer text recognition model. Reads single text lines, including handwriting.
TrOCR 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": "microsoft/trocr","fallbacks": ["stepfun/got-ocr-2"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
TrOCR alternativesGOT-OCR 2.0 alternativesBest OCR models in 2026