mindee/doctr
docTR (Document Text Recognition) - a seamless, high-performing & accessible library for OCR-related tasks powered by Deep Learning. Ongoing development and maintenance by t2k.
What it solves
docTR provides a seamless and accessible way to perform Optical Character Recognition (OCR) on documents. It allows users to parse textual information by localizing words and identifying characters from PDFs, images, or webpages, effectively converting visual document data into machine-readable text.
How it works
The library uses a two-stage approach for end-to-end OCR:
- Text Detection: Localizing where words are on the page using architectures like DBNet, LinkNet, or FAST.
- Text Recognition: Identifying the characters within those localized words using architectures such as CRNN, SAR, MASTER, ViTSTR, PARSeq, or VIPTR.
Additionally, it offers a KIE (Key Information Extraction) predictor for detecting specific classes of information (e.g., dates and addresses) and a layout detection model to identify regions like titles, tables, and footers.
Who it’s for
It is designed for developers and organizations looking to integrate high-quality OCR and document analysis into their applications, ranging from simple script-based analysis to full API deployments using FastAPI.
Highlights
- Flexible Architectures: Supports multiple pretrained models for both detection and recognition.
- Versatile Input: Processes PDFs, images, and URLs.
- Document Structure: Returns a nested object structure (Page, Block, Line, Word) that can be exported to JSON.
- Layout & Table Analysis: Includes capabilities for detecting document layout regions and table structures.
- Deployment Ready: Provides Docker images and a FastAPI template for quick API integration.
Related
- Project
- Project
- Project
- Project
- Project