TrOCR vs Florence-2
Pick TrOCR if you already have single text-line crops and need English handwriting, where the large model reports 2.89 CER on IAM. Pick Florence-2 if you need text with bounding boxes from scene images or labels, or one small model that also does captioning and detection. Neither reads full pages as structured documents, and neither is a good fit for non-English text without extra work.
TrOCRmicrosoft/trocr | Florence-2microsoft/florence-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 | 0.8 s / page |
| Best for | Handwritten text lines | Lightweight OCR with boxes |
| Inputs | images | images |
| Languages | English | English |
| Max pages per request | 100 | 500 |
| Tables | No | No |
| Handwriting | ✓ Yes | No |
| Math | No | No |
| 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.
- It ships separate checkpoints fine-tuned for handwritten (IAM), printed (SROIE) and scene text, and suits fine-tuning on your own line images.
- It loads in a few lines with Hugging Face transformers under an MIT license, which suits receipt text lines and English handwritten lines.
Choose Florence-2 if
- OCR_WITH_REGION returns quadrilateral boxes per text line, so you get positions as well as text.
- At 0.23B (base) or 0.77B (large) it is much smaller than TrOCR-large at 558M, which suits lightweight edge OCR in English.
- The same model also does captioning, detection and grounding, so one model can cover a pipeline that needs more than OCR.
Key differences
| TrOCR | Florence-2 | |
|---|---|---|
| Input it reads | Single text-line images only; you need a separate line detector | Prompt-based; OCR task returns text, OCR_WITH_REGION returns text with boxes |
| Output formats | Plain text | Plain text and bounding boxes (quadrilaterals per line) |
| Model size | Base 334M, large 558M | Base 0.23B, large 0.77B |
| Handwriting | 2.89 CER on IAM (large, per the paper); checkpoint fine-tuned for handwriting | Spelling errors and missing spaces on cursive handwriting in a Hugging Face blog test |
| Non-English text | Checkpoints are English-focused; other languages need fine-tuning | Chinese output mostly wrong; vocabulary lacks CJK characters; errors on French text in a blog test |
| Tables and layout | No layout, table or page-level output | No Markdown, tables or LaTeX, only text and boxes |
| Licence and price | MIT; free, self-hosted (you pay for compute) | MIT; free, self-hosted (you pay for compute) |
Sources
- TrOCR paper (arXiv 2109.10282)
- trocr-large-handwritten model card
- Florence-2-large model card
- HF blog OCR test
- HF discussion Chinese very bad
What each one is
TrOCR
Transformer text recognition model. Reads single text lines, including handwriting.
TrOCR detailsFlorence-2
Small Microsoft vision model (0.23B and 0.77B) with OCR and OCR-with-regions tasks that return text with boxes.
Florence-2 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": ["microsoft/florence-2"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
TrOCR alternativesFlorence-2 alternativesBest OCR models in 2026