{"id":24146,"library":"onnxtr","title":"OnnxTR","description":"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.","status":"active","version":"0.8.1","language":"python","source_language":"en","source_url":"https://github.com/Mindee/onnxtr","tags":["OCR","text-recognition","onnx","document-processing","deep-learning"],"install":[{"cmd":"pip install onnxtr","lang":"bash","label":"pip install"}],"dependencies":[],"imports":[{"wrong":"from onnxtr import OCRPredictor","symbol":"OCRPredictor","correct":"from onnxtr import OCRPredictor"}],"quickstart":{"code":"from onnxtr import OCRPredictor\nfrom doctr.io import DocumentFile\n\n# Initialize predictor with detection + recognition models\npredictor = OCRPredictor(\n    det_arch='db_resnet50',\n    reco_arch='crnn_vgg16_bn',\n    pretrained=True\n)\n\n# Load a document image\ndoc = DocumentFile.from_images(\"path/to/image.jpg\")\n\n# Perform OCR\nresult = predictor(doc)\nprint(result.render())\n","lang":"python","description":"Basic usage of onnxtr to perform OCR on an image and print the recognized text."},"warnings":[{"fix":"Upgrade Python to 3.10 or later; or use onnxtr<0.8.0 (not recommended).","message":"onnxtr 0.8.0+ requires Python >=3.10; Python 3.9 is not supported.","severity":"breaking","affected_versions":">=0.8.0"},{"fix":"Use DocumentFile.from_images() or ensure image is converted to RGB: cv2.cvtColor(img, cv2.COLOR_BGR2RGB).","message":"Input 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.","severity":"gotcha","affected_versions":"all"},{"fix":"Use docTR's onnx_export utilities. See docTR documentation.","message":"The standalone OnnxTR model export tools are deprecated; use docTR's native ONNX export instead.","severity":"deprecated","affected_versions":">=0.7.0"}],"env_vars":null,"search_vec":"'0.8.1':44 '3.10':47 '4':49 'cadenc':51 'current':42 'deep':63 'deep-learn':62 'detect':25 'doctr':13 'document':21,60 'document-process':59 'end':29,31 'end-to-end':28 'export':39 'high':17 'high-perform':16 'irregular':53 'learn':64 'model':38 'ocr':19,32,54 'onnx':2,9,41,58 'onnx-wrap':8 'onnxtr':1,5 'perform':18 'pipelin':33 'pre':36 'pre-train':35 'process':61 'provid':15 'python':46 'recognit':4,26,57 'releas':50 'requir':45 'support':23 'text':3,24,56 'text-recognit':55 'train':37 'use':34 'version':11,43 'wrap':10","created_at":"2026-05-01T08:11:32.328160+00:00","updated_at":"2026-05-01T08:11:32.328160+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\n  File \"/tmp/tmp4c9zfknt/venv/lib/python3.12/site-packages/onnxtr/__init__.py\", line 1, in <module>\n    from . import io, models, contrib, transforms, utils\n  File \"/tmp/tmp4c9zfknt/venv/lib/python3.12/site-packages/onnxtr/io/"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.8.1","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/felixdittrich92/OnnxTR","docs":null,"changelog":"https://github.com/felixdittrich92/OnnxTR/releases","pypi":"https://pypi.org/project/onnxtr/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["ai-ml","data"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}