OCRRouter

docTR vs Florence-2

Pick docTR for printed documents such as invoices and receipts, where you need word-level text with coordinates and a nested page, block, line and word JSON export. Pick Florence-2 for scene text and short English labels, or when one small model must also do captioning and detection. Neither model outputs tables or Markdown, and Florence-2 is a poor fit for handwriting and Chinese.

docTRmindee/doctrFlorence-2microsoft/florence-2
TypeOpen sourceOpen source
Price1 credit / page1 credit / page
Per 1,000 pages$1.00$1.00
Typical speed0.9 s / page0.8 s / page
Best forWord-level OCR with positionsLightweight OCR with boxes
InputsPDF, imagesimages
LanguagesMainly Latin scriptsEnglish
Max pages per request500500
TablesNoNo
HandwritingNoNo
MathNoNo
Bounding boxes✓ Yes✓ Yes
Confidence✓ YesNo
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 docTR if

  • It exports a nested page, block, line and word structure with coordinates as JSON, which suits custom extraction on invoices and receipts.
  • You can choose detection and recognition architectures, with straight or rotated boxes, and train your own models in Python.
  • It is Apache-2.0, ships ready Docker images, and includes a key information extraction predictor.

Choose Florence-2 if

  • It is small at 0.23B (base) or 0.77B (large) parameters and MIT licensed, so it suits lightweight edge OCR in English.
  • OCR_WITH_REGION returns quadrilateral boxes per text line, which works for scene text and short labels.
  • The same model also does captioning, detection and grounding, so one model can serve a pipeline that needs more than OCR.

Key differences

docTRFlorence-2
What it isTwo-stage text detection and recognition OCR library from Mindee, built on PyTorchMicrosoft's prompt-based vision foundation model with OCR as one of its tasks
LicenceApache-2.0MIT
How you run itLocally in Python, with Docker images; GPU images need CUDA 12.2 or newer on the hostSelf-hosted via Transformers
PriceFree, self-hosted (you pay for compute)Free, self-hosted (you pay for compute)
Output formatsJSON with page, block, line and word hierarchy, plain text, bounding boxesPlain text and bounding boxes (quadrilateral boxes per text line)
Model sizeNot published0.23B (base), 0.77B (large)
Known failuresSplit-crop merging misjoins readings across repeated characters; cropping images gives poorer results; ONNX export of MASTER truncates decoding stepsSpelling errors and missing spaces on cursive handwriting and French text; Chinese output mostly wrong because the vocabulary lacks CJK characters

Sources

What each one is

docTR

Open-source OCR library from Mindee with separate text detection and recognition models.

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

Questions

More comparisons

docTR alternativesFlorence-2 alternativesBest OCR models in 2026