docTR vs Surya
docTR
mindee.github.ioSurya
github.comSide by side
| Figure | docTR | Surya |
|---|---|---|
| Price from | Free | $400/mo |
| Free plan | Yes | Yes |
| Free trial | — | — |
| Open source | — | — |
| Windows | Yes | — |
| macOS | Yes | Yes |
| Linux | Yes | Yes |
| API | Yes | Yes |
| Self-hosted | Yes | Yes |
| Plans published | 1 | 3 |
| Spec score · OCR API Software | 8.9 (#2) | 8.2 (#13) |
| Spec score · OCR software | 9.0 (#3) | 8.7 (#6) |
| Supported inputs | both | both |
| Installation | The library can be installed with pip or from Git, and official Docker images are available from GitHub Container Registry. | The README installs Surya with pip install surya-ocr and lists Docker plus NVIDIA Container Toolkit for NVIDIA GPU use, or llama.cpp for CPU and Apple Silicon. |
| License | The documentation's source code identifies the program as licensed under Apache License 2.0. | The Surya code is Apache 2.0, while the model weights use a modified AI Pubs Open Rail-M license with commercial-use conditions described in the README. |
| Output | OCR results can be rendered as plain text or exported as a JSON-serialisable nested dictionary. | Surya 2 returns page content as structured blocks with HTML, polygons, bounding boxes, confidence, and reading order. |
| Primary platform | desktop | desktop |
| Purpose | docTR is a deep learning OCR library for locating and recognizing text in documents, intended for document automation and research. | Surya is a 650M-parameter OCR model for text recognition, layout analysis, reading order, and table recognition. |
| Support | The contribution guide directs users with questions to GitHub Discussions and also mentions a #doctr channel on Slack. | Datalab lists community support on Free, email and Slack support on Team, and dedicated support on Enterprise. |
Plans
In their own words
docTR
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.
Surya
Surya is a 650M-parameter OCR model for extracting text and analyzing document structure. It handles layout, reading order and tables, and supports OCR in 91 languages. Surya 2 returns page content as structured blocks that can include HTML, polygons, bounding boxes, confidence values and reading order. Table recognition can provide row and column geometry; full mode can also return HTML with spanning cells and header rows. Equations found in page OCR are represented as KaTeX-compatible LaTeX within math tags. Users can work with a Python package, command-line tools or an interactive Streamlit app for images and PDFs. Layout, OCR and table recognition require an inference backend: vLLM on NVIDIA GPUs or llama.cpp on CPU and Apple Silicon, or a connection to an existing server. Surya is free and open source. The code uses Apache 2.0, while the model weights have a separate modified AI Pubs Open Rail-M license with commercial-use conditions. It is specialized for documents, not photos or natural scenes.