{"library":"onnxocr-ppocrv5","title":"ONNX-based OCR (PP-OCRv5)","description":"`onnxocr-ppocrv5` is a Python library providing an ONNX-based inference pipeline for Baidu's PP-OCRv5. It aims for efficient optical character recognition by leveraging ONNX Runtime for high-performance inference. The current version is 0.0.14, and releases appear to be infrequent, typically focusing on specific model updates or bug fixes.","language":"python","status":"active","last_verified":"Sun May 17","install":{"commands":["pip install onnxocr-ppocrv5"],"cli":null},"imports":["from onnxocr_ppocrv5 import OnnxOCR"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import os\nfrom onnxocr_ppocrv5 import OnnxOCR\n\n# NOTE: Replace with a path to your actual image file\n# For demonstration, we assume an image 'example.png' exists in the current directory\n# In a real application, you might download or provide an actual image path.\nimage_path = os.environ.get('OCR_IMAGE_PATH', 'example.png')\n\n# The first initialization will automatically download necessary models (~300-500 MB)\n# This requires an internet connection and can take some time.\nprint(\"Initializing OnnxOCR model... (models will download on first run)\")\nocr = OnnxOCR()\nprint(\"OCR model initialized.\")\n\n# Perform OCR on an image file path\n# Ensure the image_path points to a valid image accessible by the script.\nif os.path.exists(image_path):\n    try:\n        result = ocr(image_path)\n        print(\"OCR Result:\")\n        for box_info in result:\n            # Each box_info is a dictionary with 'box' and 'text'\n            print(f\"  Text: {box_info['text']}, Box: {box_info['box']}\")\n    except Exception as e:\n        print(f\"Error performing OCR: {e}\")\n        print(\"Please ensure the image_path is valid and the image is not corrupt.\")\nelse:\n    print(f\"Error: Image file not found at '{image_path}'. Please provide a valid image path.\")\n","lang":"python","description":"This quickstart demonstrates how to initialize the `OnnxOCR` model and perform OCR on a local image file. The model automatically downloads necessary ONNX files on the first run, which requires an internet connection and sufficient disk space.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-17","installed_version":"0.0.18","pypi_latest":"0.0.18","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":50,"avg_install_s":5.3,"avg_import_s":null,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"onnxocr-ppocrv5","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"onnxocr-ppocrv5","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":5.4,"import_time_s":null,"mem_mb":null,"disk_size":"142M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"onnxocr-ppocrv5","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"onnxocr-ppocrv5","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":5.2,"import_time_s":null,"mem_mb":null,"disk_size":"150M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"onnxocr-ppocrv5","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"onnxocr-ppocrv5","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":4.8,"import_time_s":null,"mem_mb":null,"disk_size":"138M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"onnxocr-ppocrv5","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"onnxocr-ppocrv5","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":4.9,"import_time_s":null,"mem_mb":null,"disk_size":"138M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"onnxocr-ppocrv5","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"onnxocr-ppocrv5","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":6.3,"import_time_s":null,"mem_mb":null,"disk_size":"147M"}]}}