rapidocr-onnxruntime
A cross platform OCR Library based on OnnxRuntime.
What it is and what it does
RapidOCR is an open-source OCR library that converts images to text using ONNX-format models derived from PaddleOCR. It wraps nine runtime dependencies—opencv-python, numpy, Pillow, onnxruntime, and others—to provide text detection and recognition in a single Python interface. The package is designed for offline deployment with minimal resource consumption and cross-platform compatibility.
You instantiate a RapidOCR engine and call it on image paths or URLs; it returns structured results containing detected text boxes and their content. The library supports Chinese and English by default, with other languages available via model substitution. It is actively maintained, widely used in downstream projects (langchain, Docling, and others), and carries no known security vulnerabilities.
Use it for:
- Extract text from scanned documents or screenshots for archival or processing pipelines.
- Build document understanding workflows that combine OCR with language models for semantic analysis.
- Automate data entry by recognizing text in forms, receipts, or invoices without cloud API calls.
- Integrate OCR into desktop or embedded applications requiring offline text recognition.
- Detect and extract multilingual text from images in real-time applications.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Performs optical character recognition (OCR) on images to extract text, supporting Chinese, English, and other languages via ONNX Runtime inference.
Yes. The package is actively maintained, has low install friction, carries no known vulnerabilities, and is widely adopted in production systems. Apache 2.0 licensing is permissive. Install it if you need offline OCR with reasonable speed and accuracy; verify model download behavior and performance on your target hardware before committing to production use.
Install
rapidocr-onnxruntime on PyPI
pip
pip install rapidocr-onnxruntimeuv
uv add rapidocr-onnxruntimepoetry
poetry add rapidocr-onnxruntimeInstalling rapidocr-onnxruntime
Before you install
Low friction: pure Python wheel with no compiled dependencies beyond onnxruntime. Active maintenance with recent commits and 7492 repository stars. Supports Python 3.6 through 3.12.
License in practice
Apache 2.0 permissive license. The OCR model copyright is held by Baidu; engineering scripts are owned by the repository. You may use, modify, and distribute freely with attribution.
Quickstart
pip install rapidocr-onnxruntime onnxruntime
from rapidocr import RapidOCR
engine = RapidOCR()
result = engine("path/to/image.jpg")
print(result)
onnxruntime must be installed separately; models are downloaded on first use and require internet access or manual placement.
Verify before relying
- Whether model download/caching behavior and disk space requirements are documented
- Performance characteristics (inference speed, memory usage) on typical hardware
- Accuracy metrics for supported languages beyond Chinese and English
Package facts
| License | Apache-2.0 (permissive) |
| Python support | capped below the current Python release (<3.13,>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 9 — pyclipper, opencv-python, numpy, six, Shapely, PyYAML, Pillow, onnxruntime, tqdm |
| Maintenance | actively maintained — 574 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,517,725/month — #3,027 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: rapidocr_onnxruntime-1.4.4-py3-none-any.whl
Keywords: ocr, text_detection, text_recognition, db, onnxruntime, paddleocr, openvino, rapidocr
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
cnocrCnOCR recognizes text in images—Chinese…
permissive · top 15,000 on PyPI
rapidocrRapidOCR extracts text from images using…
permissive · top 5,000 on PyPI
easyocrEasyOCR performs optical character recognition…
permissive · top 5,000 on PyPI
cnstdDetects text and mathematical formulas in…
permissive · top 15,000 on PyPI
paddleocrPaddleOCR extracts text, tables, and structured…
permissive · top 5,000 on PyPI
onnxtrOnnxTR extracts and recognizes text from…
permissive · top 15,000 on PyPI
ddddocrRecognizes text and detects objects in captcha…
permissive · top 15,000 on PyPI
paddlexPaddleX is a low-code framework for training,…
permissive · top 5,000 on PyPI
winrt-Windows.Media.OcrProvides Python bindings to Windows Runtime…
permissive · top 15,000 on PyPI
python-doctrpython-doctr extracts and localizes text from…
permissive · top 15,000 on PyPI