doctr

A Python OCR library that extracts text from PDFs and images by detecting words and recognizing their characters. Use it to add document text extraction to an application.

Browse open issues

Pick a small issue you can reproduce, then fix it with your AI coding agent.

Share on XLicense: Apache-2.0

Overview

docTR is a Python library for extracting text from documents with deep-learning OCR. It uses a two-stage pipeline: a detection model locates words, then a recognition model reads them. The library accepts PDFs and images, and can also load webpages when the required dependency is installed. Users choose detection and recognition architectures, run a pretrained predictor on a document, and use the resulting text and layout information in their applications.

Key features

  • Detects word locations and recognizes their text in a two-stage OCR pipeline
  • Lets users select detection and recognition model architectures
  • Loads PDFs and images, with webpage input available when its dependency is installed
  • Can detect document layout as part of the OCR pipeline

Best for

Developers who need deep-learning OCR to extract text from document PDFs or images. It is also useful when an application needs selectable OCR models or document layout detection.

Upstream
mindee/doctr
Fork on GitHub
Guo-astro/doctr
Upstream stars
6.4k
Category
Documents, media and content
Language
Python
License
Apache-2.0
Forked
2026-10-05
Sync status
In syncLast synced 2026-11-08