surya-ocr
OCR, layout, reading order, and table recognition in 90+ languages.
Decision gist · record as of 2026-08-14
Yes, with conditions. Surya is actively maintained, popular, and offers strong multilingual OCR and layout analysis in a single model. Install it if you need document intelligence beyond basic text extraction and can provision the external inference backend (Docker+GPU or llama.cpp). If you lack GPU access or cannot run a separate inference server, the CPU path via llama.cpp may be slow. Commercial use of model weights requires a separate license agreement for revenue above $5M.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires vllm (NVIDIA GPU with Docker + NVIDIA Container Toolkit) or llama.cpp binary (CPU/Apple Silicon) to be installed and available before first inference run.
- Low install friction with a pure Python wheel.
- Active maintenance (last commit 2026-07-23) and strong popularity (top 5000 PyPI, ~1M monthly downloads).
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 licensed code permits commercial use. Model weights use a modified AI Pubs Open Rail-M license: free for research, personal use, and startups under $5M funding/revenue, but broader commercial licensing requires a separate agreement from the vendor.
last release 2026-07-20 (25 days) · last repo commit 2026-07-23 · 21,273 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,024,939 downloads/mo, #4,482 on PyPI
Alternatives
Verify before relying
pip install surya-ocr
from surya.inference import SuryaInferenceManager
from surya.recognition import RecognitionPredictor
manager = SuryaInferenceManager()
rec = RecognitionPredictor(manager)
predictions = rec([image])- Actual throughput on typical hardware (description claims 5 pages/s on RTX 5090, a high-end GPU).
- Whether the 83.3% accuracy on olmOCR-bench and 87.2% multilingual benchmark translate to production use cases.
- Memory and disk footprint of the 650M parameter model and inference server.
What it is and what it does
Surya is a 650M-parameter vision-language model for document intelligence that runs layout analysis, OCR, table recognition, and reading-order detection through a unified inference interface. It supports over 90 languages and works on diverse document types (newspapers, forms, handwritten notes, corporate documents). The package wraps the model and manages an inference server (vllm on NVIDIA GPUs or llama.cpp on CPU/Apple Silicon), spawning it automatically on first use or attaching to an existing server via environment variable.
The package provides command-line tools (surya_ocr, surya_layout, surya_table) and a Python API (RecognitionPredictor, LayoutPredictor, TableRecPredictor) that all share a single SuryaInferenceManager instance. Output includes per-block text with bounding boxes, canonicalized layout labels, table structure (rows and columns), and reading order. It depends on torch, torchvision, transformers, huggingface-hub, and opencv-python-headless for model loading and image processing.
Use it for
- Extract structured text and layout from scanned documents or PDFs for downstream NLP or database ingestion.
- Automatically detect and extract tables from documents, preserving row/column structure.
- Determine reading order and logical flow in complex multi-column or multi-element layouts.
- Process multilingual documents (90+ languages) with a single model, avoiding language-specific OCR pipelines.
- Build document classification or content-routing systems that depend on layout and content type detection.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with conditions.
Surya is actively maintained, popular, and offers strong multilingual OCR and layout analysis in a single model. Install it if you need document intelligence beyond basic text extraction and can provision the external inference backend (Docker+GPU or llama.cpp). If you lack GPU access or cannot run a separate inference server, the CPU path via llama.cpp may be slow. Commercial use of model weights requires a separate license agreement for revenue above $5M.
Install
surya-ocr on PyPI
Before you install
Low install friction with a pure Python wheel. Active maintenance (last commit 2026-07-23) and strong popularity (top 5000 PyPI, ~1M monthly downloads). However, the package requires either Docker + NVIDIA Container Toolkit (for GPU inference via vllm) or llama.cpp binary (for CPU/Apple Silicon), which are external system dependencies not managed by pip.
Requires vllm (NVIDIA GPU with Docker + NVIDIA Container Toolkit) or llama.cpp binary (CPU/Apple Silicon) to be installed and available before first inference run.
License in practice
Apache-2.0 licensed code permits commercial use. Model weights use a modified AI Pubs Open Rail-M license: free for research, personal use, and startups under $5M funding/revenue, but broader commercial licensing requires a separate agreement from the vendor.
Quickstart
pip install surya-ocr
from surya.inference import SuryaInferenceManager
from surya.recognition import RecognitionPredictor
manager = SuryaInferenceManager()
rec = RecognitionPredictor(manager)
predictions = rec([image])
Verify before relying
- Actual throughput on typical hardware (description claims 5 pages/s on RTX 5090, a high-end GPU).
- Whether the 83.3% accuracy on olmOCR-bench and 87.2% multilingual benchmark translate to production use cases.
- Memory and disk footprint of the 650M parameter model and inference server.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release <4,>=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 18 packagesbeautifulsoup4clickfilelockfiletypehttpxhuggingface-hubopenaiopencv-python-headlesspillowplatformdirspydantic-settingspydanticpypdfium2python-dotenvrequeststorchtorchvisiontransformers |
| Maintenance | Actively maintained 25 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,024,939 / month, #4,482 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: surya_ocr-0.22.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “reading order detection”
- surya-ocrSurya is an OCR and document intelligence model that extracts text,…
- aspy.yamlProvides order-preserving YAML loading and dumping functions that…
- pytest-find-dependenciesA pytest plugin that identifies dependencies between tests by running…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also img2table · marker-pdf · paddleocr · layoutparser · python-doctr · docling-ibm-models · datalab-python-sdk · ddddocr · keras-ocr · unstructured-inference