TrOCR vs Hunyuan OCR
Pick TrOCR if you already have cropped single text-line images, especially English handwriting or receipt lines, and want an MIT-licensed recognizer you can fine-tune. Pick Hunyuan OCR if you need to read whole images, with parsing, extraction, translation and structured output from one model. The main split is scope: TrOCR reads one line and needs a separate line detector, while Hunyuan OCR is an end-to-end model.
TrOCRmicrosoft/trocr | Hunyuan OCRtencent/hunyuan-ocr | |
|---|---|---|
| Type | Open source | Open source |
| Price | 1 credit / page | 2 credits / page |
| Per 1,000 pages | $1.00 | $2.00 |
| Typical speed | 1.2 s / page | 1.5 s / page |
| Best for | Handwritten text lines | Chinese documents and photos |
| Inputs | images | PDF, images |
| Languages | English | 100+ languages |
| Max pages per request | 100 | 500 |
| Tables | No | ✓ Yes |
| Handwriting | ✓ Yes | No |
| Math | No | ✓ Yes |
| Bounding boxes | No | ✓ Yes |
| Confidence | No | No |
| Forms | No | No |
| Multilingual | No | ✓ Yes |
| 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, which suits English handwritten lines.
- It has separate checkpoints fine-tuned for handwritten (IAM), printed (SROIE) and scene text, and it is a good base for fine-tuning on your own line images.
- It is MIT licensed and loads in a few lines with Hugging Face transformers, with no region restrictions or user-count thresholds.
Choose Hunyuan OCR if
- One roughly 1B model covers document parsing, text spotting, information extraction and image translation, so you do not need a separate line detector.
- It outputs Markdown, HTML, LaTeX, JSON, plain text and bounding boxes, and v1.5 supports images up to 4K and a 128K context window.
- It handles low-resource and ancient scripts, photo and scene text, and text-image translation, and it can run on a laptop through llama.cpp GGUF.
Key differences
| TrOCR | Hunyuan OCR | |
|---|---|---|
| Input scope | Single text-line images only; a separate line detector is needed | Whole images; parsing, spotting, extraction and translation |
| Output formats | Plain text; no layout, table or page-level output | Markdown, HTML, LaTeX, JSON, plain text, bounding boxes |
| License | MIT | Tencent Hunyuan Community License; excludes EU, UK and South Korea; separate license above 100M monthly active users |
| Model size | Base 334M, large 558M parameters | About 1B parameters |
| How you run it | Locally through Hugging Face transformers; free, you pay for compute | Self-hosted via vLLM, Transformers or llama.cpp; the unified vLLM environment recommends CUDA 13; free, you pay for compute |
| Languages | Checkpoints are English-focused; other languages need fine-tuning | Includes low-resource and ancient-script OCR |
| Benchmark | 2.89 CER on IAM handwriting (TrOCR-large, authors) | 67.11 ParseBench-2 overall, 63.86 ParseBench mean (v1.5, independent) |
Sources
- TrOCR paper (arXiv 2109.10282)
- trocr-large-handwritten model card
- microsoft/unilm repository
- HunyuanOCR model card
- Hunyuan Community License
What each one is
TrOCR
Transformer text recognition model. Reads single text lines, including handwriting.
TrOCR detailsHunyuan OCR
Small end-to-end OCR model from Tencent covering parsing, extraction and photo translation.
Hunyuan OCR 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": ["tencent/hunyuan-ocr"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
TrOCR alternativesHunyuan OCR alternativesBest OCR models in 2026