Metadata-Version: 2.4
Name: paddleocr-onnx-reader
Version: 0.1.0
Summary: ONNX Runtime reader for PaddleOCR detection and recognition models
License-Expression: BSD-3-Clause AND Apache-2.0
License-File: LICENSE
License-File: LICENSES/PaddleOCR-Apache-2.0.txt
License-File: NOTICE
Requires-Dist: numpy>=2.1
Requires-Dist: onnxruntime>=1.20
Requires-Dist: opencv-python-headless>=4.10
Requires-Dist: pillow>=11.0
Requires-Dist: pyclipper>=1.3.0.post6
Requires-Python: >=3.13
Project-URL: Repository, https://github.com/woohp/paddleocr-onnx-reader
Description-Content-Type: text/markdown

# paddleocr-onnx-reader

ONNX Runtime reader for PaddleOCR PP-OCRv5/PP-OCRv6 detection, optional angle classification, and recognition models.

Grab the PP-OCRv6 ONNX models from the [PaddlePaddle PP-OCRv6 collection](https://huggingface.co/collections/PaddlePaddle/pp-ocrv6) on Hugging Face, e.g.:

```bash
wget -O PP-OCRv6_small_det.onnx https://huggingface.co/PaddlePaddle/PP-OCRv6_small_det_onnx/resolve/main/inference.onnx
wget -O PP-OCRv6_small_rec.onnx https://huggingface.co/PaddlePaddle/PP-OCRv6_small_rec_onnx/resolve/main/inference.onnx
```

```python
import onnxruntime as ort
from PIL import Image
from paddleocr_onnx_reader import PaddleOCRReader

reader = PaddleOCRReader(
    detector=ort.InferenceSession("PP-OCRv6_small_det.onnx"),
    recognizer=ort.InferenceSession("PP-OCRv6_small_rec.onnx"),
)

for region in reader(Image.open("image.jpg")):
    best = region.candidates[0]  # candidates are sorted best first
    print(region.box, best.text, best.confidence)
```
