OCRRouter

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/trocrFlorence-2microsoft/florence-2
TypeOpen sourceOpen source
Price1 credit / page1 credit / page
Per 1,000 pages$1.00$1.00
Typical speed1.2 s / page0.8 s / page
Best forHandwritten text linesLightweight OCR with boxes
Inputsimagesimages
LanguagesEnglishEnglish
Max pages per request100500
TablesNoNo
Handwriting✓ YesNo
MathNoNo
Bounding boxesNo✓ Yes
ConfidenceNoNo
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 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

TrOCRFlorence-2
Input it readsSingle text-line images only; you need a separate line detectorPrompt-based; OCR task returns text, OCR_WITH_REGION returns text with boxes
Output formatsPlain textPlain text and bounding boxes (quadrilaterals per line)
Model sizeBase 334M, large 558MBase 0.23B, large 0.77B
Handwriting2.89 CER on IAM (large, per the paper); checkpoint fine-tuned for handwritingSpelling errors and missing spaces on cursive handwriting in a Hugging Face blog test
Non-English textCheckpoints are English-focused; other languages need fine-tuningChinese output mostly wrong; vocabulary lacks CJK characters; errors on French text in a blog test
Tables and layoutNo layout, table or page-level outputNo Markdown, tables or LaTeX, only text and boxes
Licence and priceMIT; free, self-hosted (you pay for compute)MIT; free, self-hosted (you pay for compute)

Sources

What each one is

TrOCR

Transformer text recognition model. Reads single text lines, including handwriting.

TrOCR details

Florence-2

Small Microsoft vision model (0.23B and 0.77B) with OCR and OCR-with-regions tasks that return text with boxes.

Florence-2 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": "microsoft/trocr","fallbacks": ["microsoft/florence-2"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

TrOCR alternativesFlorence-2 alternativesBest OCR models in 2026