Kraken vs TrOCR
Pick Kraken for historical manuscripts, early prints and right-to-left scripts such as Arabic and Hebrew, where you can train layout and recognition on your own material. Pick TrOCR for recognising single English text lines, such as handwriting or receipts, once you have your own line detector. The main split is scope: Kraken handles pages and layout, TrOCR only reads one cropped line at a time.
Krakenkraken/kraken | TrOCRmicrosoft/trocr | |
|---|---|---|
| Type | Open source | Open source |
| Price | 1 credit / page | 1 credit / page |
| Per 1,000 pages | $1.00 | $1.00 |
| Typical speed | 1.5 s / page | 1.2 s / page |
| Best for | Historical documents and manuscripts | Handwritten text lines |
| Inputs | images | images |
| Languages | Many scripts, incl. right-to-left | English |
| Max pages per request | 500 | 100 |
| Tables | No | No |
| Handwriting | ✓ Yes | ✓ Yes |
| Math | No | No |
| Bounding boxes | ✓ Yes | No |
| Confidence | No | No |
| Forms | No | No |
| Multilingual | ✓ Yes | 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 Kraken if
- You work with historical manuscripts, early prints or non-Latin scripts, including right-to-left, BiDi and top-to-bottom text.
- You need ALTO, PageXML, abbyyXML or hOCR output for digital humanities tools, plus trainable layout analysis and reading order.
- You can train on your own material and want community-trained models from the public Zenodo repository as a starting point.
Choose TrOCR if
- You need to read English handwritten lines, and want a model with a reported 2.89 character error rate on IAM (TrOCR-large, per the paper).
- You want a recognizer to fine-tune on custom line images, with separate checkpoints for handwritten (IAM), printed (SROIE) and scene text.
- You want a quick start under an MIT licence, loaded in a few lines with Hugging Face transformers.
Key differences
| Kraken | TrOCR | |
|---|---|---|
| Input scope | Full pages: trainable layout analysis, reading order and recognition | Single text-line images only; you need a separate line detector |
| Best-fit material | Historical manuscripts, early prints, Arabic, Hebrew and other RTL scripts | English handwritten lines, receipt text lines |
| Licence | Apache-2.0 | MIT (microsoft/unilm repository) |
| Output formats | ALTO, PageXML, hOCR, plain text, bounding boxes | Plain text; no layout, table or page-level output |
| Platform and install | Linux or macOS, x64 or ARM, Python 3.10 to 3.13; no Windows support; install conflict reported in issue #816 | Runs locally through Hugging Face transformers |
| Benchmark | Not published | 2.89 CER on IAM handwriting (TrOCR-large, authors' paper) |
| Languages and tuning | Usually needs training on your own material for good accuracy | Released checkpoints are English-focused; other languages need fine-tuning |
| Known weaknesses | Learned line order is lost in segmentation and text output (issue #820) | Up to 558M parameters for one line, slow versus CRNN recognizers on CPU |
Sources
- Kraken GitHub README
- Kraken docs
- Issue #820
- TrOCR paper (arXiv 2109.10282)
- trocr-large-handwritten model card
What each one is
Kraken
OCR engine for historical documents and manuscripts, with trainable models for unusual scripts.
Kraken detailsTrOCR
Transformer text recognition model. Reads single text lines, including handwriting.
TrOCR 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": "kraken/kraken","fallbacks": ["microsoft/trocr"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
Kraken alternativesTrOCR alternativesBest OCR models in 2026