Roboflow

docTR Overview

docTR (Document Text Recognition) is an open-source OCR toolkit developed by Mindee, with its initial public release in March 2021 under the Apache 2.0 license. It provides end-to-end document text recognition through a two-stage pipeline consisting of text detection and text recognition, both implemented as deep learning models. docTR supports multiple detection architectures including DBNet and LinkNet, and recognition architectures including CRNN and SAR, with both TensorFlow and PyTorch backends available.

docTR is designed for reading text in document images including scanned PDFs, photographs of printed documents, and forms. It handles multilingual text recognition across standard Latin-script languages and is deployable through Roboflow Inference. It is suited for document digitization pipelines, automated form processing, and applications requiring accurate structured text extraction from document images.

docTR Details & Performance

Details

Vision Tasks

OCR

Features

Usage

Past 30 Days

Not available

Not in Playground

Performance

Avg. Latency

Arena Rankings

Not yet ranked in arena

docTR Vision Evals

docTR has not yet been evaluated on the current benchmark. The results below are from the legacy version of Vision Evals, our previous benchmark. See the current Vision Evals

HighestLowest
This model#57 of 5824.02% pass rate · better than 2%
Score24.02%pass rate across 229 tasks
Speed0.44savg response per task
Costpricing unavailable
Tokenstokens unavailable
Score key:≥75%40–74%<40%
CategoryPassedScore
VQA & Extraction39 / 60
65%
Focused Scene OCR16 / 99
16.2%
Text Recognition0 / 30
0%
Handwritten Math0 / 10
0%
License Plate Recognition0 / 30
0%

Scores based on a single evaluation run · Methodology

View all legacy Vision Evals results →

Price vs. performance

Estimated cost per task vs. OCR score, for this model and others ranked near it. Upper-left is the sweet spot (high quality, low cost). Based on Vision Evals (legacy) results.

6 of 7 models plotted · 1 not yet evaluated

ModelScoreMedian tokensEst. cost / taskCompare
AnthropicClaude Sonnet 4.567.3%866$0.0039Compare
GoogleGemma 3 4B64.2%314<$0.0001Compare
OpenAIGPT-5.4 Nano62.5%294$0.0001Compare
AnthropicClaude Haiku 4.561.6%861$0.0012Compare
QwenQwen3.6 Plus58.5%166$0.0001Compare
DocTR(this model)24.0%
MoonshotAIKimi K2.519.6%706$0.0008Compare

Alternatives to docTR

Other models worth comparing for similar use cases.

Surya
Surya is an OCR and document layout analysis toolkit developed by Vikram Paruchuri and distributed via Mindee, first released in January 2024 under the GPL-3.0 license. It supports text recognition across more than 90 languages, document layout detection, reading order prediction, table recognition, and equation detection, providing a comprehensive set of tools for extracting structured information from document images.Surya is designed to operate without cloud API dependencies, running fully on local hardware with support for CPU and GPU inference. It is commonly used for digitizing scanned documents, extracting text from PDFs with complex layouts, and building automated document processing pipelines.
Azure
TrOCR
TrOCR (Transformer-based Optical Character Recognition) is an end-to-end OCR model released in September 2021 by Microsoft Research. It departs from the traditional two-stage OCR pipeline — which typically combines a CNN-based feature extractor with an RNN-based sequence decoder — by using a pure Transformer architecture composed of a pretrained image Transformer encoder and a pretrained text Transformer decoder, an approach that later became standardized as the VisionEncoderDecoder pattern in Hugging Face Transformers.TrOCR takes a cropped text line image as input and produces a sequence of output tokens, supporting printed, handwritten, and scene text recognition. The model is designed for use downstream of a separate text detection stage — TrOCR recognizes text in pre-cropped regions rather than detecting text locations in a full page. Microsoft released three size variants: TrOCR-small (62M parameters, DeiT-small encoder + MiniLM decoder), TrOCR-base (334M parameters, BEiT-base encoder + RoBERTa-large decoder), and TrOCR-large (558M parameters, BEiT-large encoder + RoBERTa-large decoder). Pretrained and fine-tuned checkpoints are available for printed text (on SROIE), handwritten text (on IAM), and scene text (on the standard scene text benchmarks) under the MIT license, distributed through the Microsoft unilm repository and Hugging Face. At release, TrOCR achieved state-of-the-art results across all three benchmark categories, and the model continues to be used as a baseline for handwritten text recognition.
Z.ai
GLM-OCR
GLM-OCR is a multimodal OCR model for complex document understanding, built on the GLM-V encoder-decoder architecture by Zhipu AI. The model combines a 0.4B-parameter CogViT visual encoder pre-trained on large-scale image-text data, a lightweight cross-modal connector with efficient token downsampling, and a 0.5B-parameter GLM language decoder, totaling 0.9B parameters. To address the inefficiency of standard autoregressive decoding in deterministic OCR tasks, GLM-OCR introduces a Multi-Token Prediction (MTP) mechanism that predicts multiple tokens per step, significantly improving decoding throughput while keeping memory overhead low through shared parameters. Training proceeds through four stages: visual encoder pretraining with MIM, CLIP, and distillation objectives; vision-language pretraining on document parsing, grounding, and VQA data; supervised fine-tuning on curated OCR datasets covering text, formula, table, and key information extraction; and full-task reinforcement learning to improve accuracy and structural consistency.At the system level, GLM-OCR adopts a two-stage pipeline in which PP-DocLayout-V3 first performs layout analysis, followed by parallel region-level recognition. This design enables robust handling of diverse document layouts including tables, formulas, and multi-column text. The model supports document parsing and targeted recognition tasks, producing structured outputs in Markdown, JSON, and LaTeX formats across more than 100 languages. On the OmniDocBench V1.5 benchmark, GLM-OCR scores 94.62, and achieves 94.0 on OCRBench and 96.5 on UniMERNet for formula recognition.
Google
Google Vision OCR
Google Vision OCR, released as part of the Cloud Vision API’s general availability in February 2016, is a proprietary Google Cloud service for extracting text from images and documents. It supports common formats like JPEG, PNG, GIF, TIFF, and PDF, and provides two main modes: TEXT_DETECTION for short snippets and scene text, and DOCUMENT_TEXT_DETECTION for dense documents, which returns structured layout information with bounding boxes.While not an LLM (so it has no token context window or parameter count), the service performs OCR across printed text and some handwriting. It outputs detected text along with positional metadata, making it useful for digitizing scanned files, receipts, forms, and signs. However, complex layouts like tables often require downstream processing. Accessible via REST and RPC APIs, with client libraries in major languages, Google Vision OCR is widely used for document processing pipelines, archival, and accessibility applications.
Azure
Florence-2
Florence-2, introduced by Microsoft Research at CVPR 2024, is an open-source vision-language foundation model designed to unify diverse computer vision tasks within a single sequence-to-sequence framework. Unlike traditional models that specialize in specific tasks, Florence-2 accepts both images and text prompts and outputs text for tasks such as captioning, object detection, segmentation, OCR, and region-based grounding. It comes in two sizes—Florence-2-base (~230M parameters) and Florence-2-large (~770M parameters)—and is trained on FLD-5B, a large dataset of ~126M images with ~5.4B annotations.The model demonstrates strong zero-shot and fine-tuned performance, often rivaling larger vision-language systems while remaining lightweight and efficient. Released under the MIT license, all weights are publicly available, making it accessible for fine-tuning and deployment in applications like VQA, content tagging, accessibility, and research. Florence-2’s compact design, versatility, and openness position it as a practical alternative to larger proprietary multimodal models.

docTR License

Apache-2.0 · Permissive license

docTR is released under Apache-2.0, a permissive license. The docTR license lets you run, fine-tune, and redistribute the model in commercial products with no obligation to open-source related code changes, so no separate commercial license is required.

Commercial use
Permitted. Because Apache-2.0 is permissive, docTR can ship inside paid products and internal systems with no commercial license and no revenue threshold.
Modification
Permitted. Fine-tuning, quantizing, and distilling are all allowed, and your code changes can stay closed. Files you change must be marked as changed.
Redistribution
Permitted with attribution. Ship the Apache-2.0 license text and any NOTICE file alongside the weights or derived code.

Apache-2.0 grants an express patent license that terminates if you bring a patent claim over the work, and it disclaims warranties. Validate docTR on your own data before you depend on it in production.

Read the full Apache 2.0 license ↗

Do I need a commercial license for docTR?

This is the straightforward case: a permissive license is the best technical solution and you are free to deploy docTR commercially without open-sourcing your own code.

Do not hesitate to reach out with questions for your commercial project — our team will help you start solving business problems on the first call. See Roboflow commercial licensing for the models included in each plan.

Talk to sales

DocTR uses an Apache 2.0 license.

Under the terms of the Apache 2.0 license, you can freely use DocTR for commercial use.

To learn more about model licensing with Roboflow, refer to our Licensing guide.

License information is provided as a guide and is not legal advice.

Frequently Asked Questions About docTR Vision

Yes. docTR accepts image input, and on Roboflow's previous vision benchmark it scored 24% on OCR.

docTR has not yet been evaluated on Roboflow's current Vision Evals. The results on this page are from the previous benchmark.