Registry / ai-ml / onnxtr

onnxtr

JSON →
library0.8.1pypypiunverified

Onnx Text Recognition (OnnxTR) is an Onnx-wrapped version of docTR that provides high-performance OCR on documents. It supports text detection, recognition, and end-to-end OCR pipelines using pre-trained models exported to ONNX. Current version 0.8.1 requires Python >=3.10 and <4. Release cadence is irregular.

pip install onnxtr
INSTALL
IMPORT
SIG · ONNXTR
O
onnxtr
ai-mlpythonv0.8.1
Install
14.0s avg
Import
Disk
318MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.8.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
installs and imports cleanly · install 14.0s · import 0.000s · 315MB
318MB installed
● package 318MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

OCRPredictor
from onnxtr import OCRPredictor
from onnxtr import OCRPredictor

Basic usage of onnxtr to perform OCR on an image and print the recognized text.

from onnxtr import OCRPredictor from doctr.io import DocumentFile # Initialize predictor with detection + recognition models predictor = OCRPredictor( det_arch='db_resnet50', reco_arch='crnn_vgg16_bn', pretrained=True ) # Load a document image doc = DocumentFile.from_images("path/to/image.jpg") # Perform OCR result = predictor(doc) print(result.render())
Debug
Known issues
breakingonnxtr 0.8.0+ requires Python >=3.10; Python 3.9 is not supported.
fix
Upgrade Python to 3.10 or later; or use onnxtr<0.8.0 (not recommended).
affects: >=0.8.0
gotchaInput images must be RGB, not BGR (openCV default). onnxtr reads images as RGB by default via docTR's DocumentFile, but using openCV directly and then converting may cause color issues.
fix
Use DocumentFile.from_images() or ensure image is converted to RGB: cv2.cvtColor(img, cv2.COLOR_BGR2RGB).
affects: all
deprecatedThe standalone OnnxTR model export tools are deprecated; use docTR's native ONNX export instead.
fix
Use docTR's onnx_export utilities. See docTR documentation.
affects: >=0.7.0
Upgrade
Version history
0.8.1latest on PyPI · released Feb 4, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
onnxtr — pip install onnxtr · libregistry