LibrePPOCRt-ocr

PP-OCRv5 mobile tier (CPU tier) converted to the LibreYOLO checkpoint format: one composite .pt bundling the DB text detector (det.*) and the CTC text recognizer (rec.*) plus the PP-OCRv5 recognition dictionary as charset metadata. Recognition covers Simplified Chinese, Traditional Chinese, English, Japanese, and Chinese pinyin with one dictionary and one model.

from libreyolo import LibreYOLO

model = LibreYOLO("LibrePPOCRt-ocr.pt")
r = model("receipt.jpg")
for poly, text, conf in zip(r.ocr.polygons, r.ocr.texts, r.ocr.conf):
    print(text, float(conf))

Provenance

Converted with weights/convert_ppocr_weights.py from the official Apache-2.0 PP-OCRv5 training checkpoints released by the PaddleOCR project (paper: PaddleOCR 3.0 Technical Report):

Upstream checkpoint SHA-256
PP-OCRv5_mobile_det_pretrained.pdparams 7e2e3b0bd5bbdcb0b842cb92aaacc2852f80299a4858b8767a45bd0c6e955648
PP-OCRv5_mobile_rec_pretrained.pdparams 04745475b97a1faf029c7442a4c4421b156249b9395814e509bf4a9804e37750

This file: LibrePPOCRt-ocr.pt, SHA-256 b04320735d94e9eb535d9342d4a89b908e0fd4d002cd16991f0e7b0523e77c7c.

The conversion is a name-mapped metadata wrap (batch-norm buffer renames, Linear transposes, det./rec. namespacing); learned parameters are unchanged. Stage parity vs the official PP-OCRv5 inference graphs on identical input tensors: detection maps match to <= 1e-4 and recognition probabilities to <= 6e-5 with identical argmax.

Code and weights are used under the Apache License 2.0. Copyright (c) 2020 PaddlePaddle Authors.

Downloads last month
145
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Paper for LibreYOLO/LibrePPOCRt-ocr