Skip to content
SPECIFICTION
Get listed

docTR

mindee.github.io

Free plan WindowsmacOSLinuxAPISelf-hosted
Visit mindee.github.io
Spec score 8.9 #2 of 29 in OCR API Software

What it is

docTR is a free deep-learning OCR library for finding and recognizing text in documents, aimed at document automation and research. Its pretrained OCR predictors first detect text and then recognize it, while a layout predictor identifies regions such as tables, figures, and headers. It reads PDFs and images; web-page input requires the optional HTML extra. Results can be rendered as plain text or exported as a JSON-serializable nested dictionary. The project describes its predictors as optimized for CPU and GPU inference. Users can train custom detection, recognition, layout, and table-structure models when pretrained models are not suitable. Documentation covers loading and sharing models through the Hugging Face Hub, and includes a minimal REST API deployment template and a browser demo. Installation is available through pip, Git, or official Docker images. The library requires Python 3.11 or higher, and pretrained weights download on first use and are cached locally. For AWS Lambda, the guide advises disabling multiprocessing and placing the model cache within /tmp. The project uses the Apache License 2.0.

Spec sheet

Purpose
docTR is a deep learning OCR library for locating and recognizing text in documents, intended for document automation and research.Read 5 Oct 2026 · mindee.github.io
Deployment
The documentation offers templates for a browser demo and API deployment, and documents running docTR on AWS Lambda.Read 5 Oct 2026 · mindee.github.io
Free plan
YesRead 23 Sep 2026 · mindee.github.io
Integrations
The documentation describes loading and sharing models through the Hugging Face Hub.Read 5 Oct 2026 · mindee.github.io
Support
The contribution guide directs users with questions to GitHub Discussions and also mentions a #doctr channel on Slack.Read 5 Oct 2026 · mindee.github.io
License
The documentation's source code identifies the program as licensed under Apache License 2.0.Read 5 Oct 2026 · mindee.github.io
Founded
2021Read 23 Sep 2026 · mindee.github.io
Maker
The project documentation says docTR is actively maintained by Mindee.Read 5 Oct 2026 · mindee.github.io
Customization
Users can train custom detection, recognition, layout, and table structure models when pretrained models do not meet their needs.Read 5 Oct 2026 · mindee.github.io
Extra modules
The contrib module includes an artefact detector for items such as logos, QR codes, and barcodes, and requires onnxruntime.Read 5 Oct 2026 · mindee.github.io
Inference
The project describes its predictors as optimized for inference on both CPU and GPU.Read 5 Oct 2026 · mindee.github.io
Input formats
docTR can read PDFs, images, and web pages, with HTML input requiring the optional html extra.Read 5 Oct 2026 · mindee.github.io
Inputs and outputs
The quickstart shows loading PDFs, images, and web pages and exporting results as plain text or a JSON-serializable dictionary.Read 5 Oct 2026 · mindee.github.io
Installation
The library can be installed with pip or from Git, and official Docker images are available from GitHub Container Registry.Read 5 Oct 2026 · mindee.github.io
Installation requirement
The library requires Python 3.11 or higher and can be installed from pip, Git, or an official Docker image.Read 5 Oct 2026 · mindee.github.io
Layout analysis
A layout predictor detects document regions such as tables, figures, and headers.Read 5 Oct 2026 · mindee.github.io
OCR features
It provides pretrained two-stage text detection and recognition predictors and a layout analysis predictor for regions such as tables, figures, and headers.Read 5 Oct 2026 · mindee.github.io
OCR pipeline
Its pretrained OCR predictors use a two-stage text detection and recognition pipeline.Read 5 Oct 2026 · mindee.github.io
Output
OCR results can be rendered as plain text or exported as a JSON-serialisable nested dictionary.Read 5 Oct 2026 · mindee.github.io
Pretrained weights
Pretrained weights are downloaded on first use and cached locally for later calls.Read 5 Oct 2026 · mindee.github.io
Primary platform
desktopRead 23 Sep 2026 · mindee.github.io
Requirements
The installation guide requires Python 3.11 or higher.Read 5 Oct 2026 · mindee.github.io
Security considerations
For AWS Lambda, the guide says to disable multiprocessing and set the model cache directory within /tmp to comply with Lambda's write restrictions.Read 5 Oct 2026 · mindee.github.io
Support resources
The documentation provides community resources and tools, and invites users to submit issues or pull requests for community models.Read 5 Oct 2026 · mindee.github.io
Supported inputs
bothRead 23 Sep 2026 · mindee.github.io

Plans and prices

docTR open-source Python library Free Python 3.11 or higher · install with pip, Git, or Docker Read 5 Oct 2026 · mindee.github.io

Every docTR plan and price →

Strong points and limits

Strong points

  • Pretrained text detection and recognition pipeline.
  • Layout predictor identifies tables, figures, and headers.
  • Reads PDFs and images; web pages with an extra.
  • Can train custom detection and recognition models.
  • Free under Apache License 2.0.

Limits

  • Requires Python 3.11 or higher.
  • Web-page input needs the optional HTML extra.
  • Pretrained weights download on first use.

Who it suits

docTR suits developers and researchers building document automation or OCR workflows who can work with Python 3.11 or higher. Its custom-model options may suit tasks pretrained models do not meet.

docTR in depth

Read the full write-up

docTR is a free OCR library for developers and researchers building document processing into Python workflows. Its combination of text recognition, layout analysis, and custom-model training is a strong fit for tailored pipelines; the Python 3.11-or-higher requirement rules it out for older environments.

Overview

docTR is a software component, not a ready-to-use scanning app: its value is in giving a development team OCR predictors to incorporate into its own automation or research system. The two-stage detection-and-recognition pipeline extracts text, while layout analysis adds regions such as tables, figures, and headers. That structure is useful when later processing depends on where content appears, but teams looking for a turnkey OCR service should choose a different kind of product.

The Apache License 2.0 and installation through pip, Git, or official Docker images give teams several ways to incorporate the library. Pretrained weights download on first use and are cached locally, so deployments should account for that initial fetch and cache location.

Key features

Text detection and recognition: Pretrained predictors locate text and recognize it in a two-stage pipeline. Results can be rendered as plain text or exported as a JSON-serializable nested dictionary, making them usable in downstream code without requiring a particular output presentation.

Layout analysis: A separate predictor detects regions including tables, figures, and headers. This is a practical advantage for workflows that need document structure alongside recognized text, rather than only a flat transcription.

Mixed inputs: The library reads PDFs, images, and web pages; HTML input requires the optional html extra. That supports varied source material, though deployments using HTML must include the extra.

Inference and model training: Predictors are described as optimized for CPU and GPU inference. Users can train custom detection, recognition, layout, and table-structure models when pretrained options do not fit their needs. This flexibility suits teams able to take on model work; it is less compelling for users who need an off-the-shelf workflow without development effort.

Integration and deployment: The documentation describes loading and sharing models through Hugging Face Hub, provides a minimal REST API deployment template, and includes a browser demo. These options help teams connect the library to broader systems, but the core offering remains a Python library.

Optional artefact detection: The contrib module includes detection for items such as logos, QR codes, and barcodes, and requires onnxruntime. Keep that dependency in mind if those capabilities are part of the deployment.

Pricing

docTR open-source Python library — free. The free plan includes the Python library and requires Python 3.11 or higher; installation is available through pip, Git, or Docker. There is no separate paid tier or trial to weigh against it. The meaningful costs are operational: teams supply the environment and integration work, and should plan for pretrained weights to download and cache on first use.

Platforms

docTR is listed for API, Linux, macOS, self-hosted, and Windows use, with desktop as its primary platform. Its installation paths include pip, Git, and official Docker images. The Python 3.11-or-higher requirement is a firm compatibility consideration. For AWS Lambda, the installation guidance says to disable multiprocessing and place the model cache under /tmp to meet the platform's write restrictions.

Who it's for

docTR best suits developers and research teams building document automation who want to integrate OCR, inspect page layout, or train their own models. It is a particularly sensible choice when a workflow needs a Python-native component and the team can manage dependencies and deployment. It is not the natural choice for people seeking a finished desktop OCR product or a managed service that avoids integration work.

Community support is available through GitHub Discussions and a #doctr Slack channel. The documentation also invites issue and pull-request contributions for community models, a useful route for teams that want to participate in the project ecosystem.

Pros and cons

Pros

Free, Apache-licensed library: The free plan and Apache License 2.0 make it straightforward to evaluate and incorporate into software.

Structure as well as text: Layout prediction for tables, figures, and headers provides signals that plain OCR output alone would not supply.

Room to tailor models: Training options cover detection, recognition, layout, and table structure when pretrained models are not suitable.

Several deployment routes: pip, Git, Docker images, a REST API template, and Hub model sharing give development teams choices for fitting it into their stack.

Cons

Modern Python required: Python 3.11 or higher excludes older environments and may complicate adoption in established systems.

Integration is the user's job: A library and minimal API template are not a finished OCR application; teams need the skills and time to build their workflow.

Some capabilities bring extra dependencies: HTML input needs the optional html extra, and artefact detection needs onnxruntime, so deployments should account for these requirements.

Alternatives

Tesseract OCR is another free, Apache 2.0 OCR engine, with Android support as well as API, Linux, macOS, self-hosted, and Windows platforms. Choose it when that broader platform coverage is more important than docTR's stated layout and custom-model options.

PaddleOCR offers an Official API Free Tier with a daily parsing limit of 20,000 pages and Android and iOS platforms. Choose it when a hosted API and a stated daily page allowance fit better than integrating a Python library.

FreeOCR.AI offers a freemium plan and paid plans at $10 a month for 10,000 monthly credits or $80 a year for 120,000 credits. Consider it if those credit-based plan terms fit your workload.

OCRmyPDF is free software for self-hosted installation and depends on external OCR and PDF tools. Pick it when that self-hosted approach and dependency model suit your PDF workflow.

EasyOCR is a free option for Linux, macOS, self-hosted, and Windows use. Compare it when you want another free OCR tool for those platforms.

Open-Capture is free, open source under GNU GPLv3, and has no limit on users, with API, Linux, self-hosted, and web platforms. Consider it when its licensing and user terms fit your deployment.

ScanScan is a freemium option across Android, iOS, macOS, web, and Windows, with a 30.00 CNY one-time plan for permanent access. Consider it if those platforms and one-time payment terms suit you.

ABBYY FineReader PDF is a paid option for iOS, macOS, and Windows, with Standard and Corporate plans each described as one standalone license. Choose it when a paid standalone product is a better fit than a Python library.

Browse OCR software for more tools in the category.

Browse OCR API software if you are comparing API-focused options.

Verdict

Choose docTR if you are a developer or researcher who wants a free, Apache-licensed Python foundation for OCR, layout analysis, and custom model training. Its breadth is most valuable when you can build and maintain the surrounding workflow. Look elsewhere if Python 3.11 or higher does not fit your environment or you need a finished OCR application rather than a library.

Verdict

docTR offers OCR, layout analysis, and custom-model training in a free Python library. Confirm the Python requirement and any optional input dependencies fit your deployment.

Where Specifiction places it

Alternatives to docTRAll alternatives →