ONNX Model Zoo

ilaylow/PP_OCRv5_mobile_onnx

By ilaylow · ↓ 0 · ♥ 1 · Updated 2026-03-19

What's in this repo

This page lists the files in ilaylow/PP_OCRv5_mobile_onnx, including ppocrv5_det.onnx, ppocrv5_rec.onnx.

  • 2 ONNX models (.onnx files)
  • 4 files, including 2 .onnx, 1 .md
  • Last updated 2026-03-19

ONNX files

File Size Download
ppocrv5_det.onnx — Download
ppocrv5_rec.onnx — Download

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README

PP-OCRv5 Mobile ONNX

Model Source (Rec): https://huggingface.co/PaddlePaddle/PP-OCRv5_mobile_rec

Model Source (Det): https://huggingface.co/PaddlePaddle/PP-OCRv5_mobile_det

Converted using paddle2onnx:

  • https://github.com/PaddlePaddle/PaddleOCR/blob/main/deploy/paddle2onnx/readme.md
  • https://github.com/PaddlePaddle/Paddle2ONNX/blob/develop/README_en.md

Example Usage:

from rapidocr_onnxruntime import RapidOCR
from huggingface_hub import hf_hub_download
import cv2

def draw_boxes_cv(image_path, ocr_result, out_path="boxed_cv.png"):
    img = cv2.imread(image_path)

    for line in ocr_result:
        box = line[0]
        xs = [p[0] for p in box]
        ys = [p[1] for p in box]

        pt1 = (int(min(xs)), int(min(ys)))
        pt2 = (int(max(xs)), int(max(ys)))

        cv2.rectangle(img, pt1, pt2, (0, 0, 255), 2)

    cv2.imwrite(out_path, img)

# Model paths
det_path = "<path_to_model>/ppocrv5_det.onnx"
rec_path = "<path_to_model>/ppocrv5_rec.onnx"
dict_path = "<path_to_dictionary>" # E.g. hf_hub_download("monkt/paddleocr-onnx", "languages/chinese/dict.txt")

# Initialize OCR model
ocr = RapidOCR(
    det_model_path=det_path,
    rec_model_path=rec_path,
    rec_keys_path=dict_path
)

result, elapsed = ocr("document.png")
for res in result:
    print(f"Word: {res[1]} with Probability: {res[2]}")

draw_boxes_cv("document.png", result)

Model info

onnx ocr license:apache-2.0 region:us
↓ 0 ♥ 1

Created: 2026-01-10

Updated: 2026-03-19

View on Hugging Face

Files (4)

.gitattributes
README.md
ppocrv5_det.onnx ONNX
ppocrv5_rec.onnx ONNX

Related models