PP-OCRv5

PP-OCRv5 is PaddleOCR's text detection and recognition pipeline: a differentiable-binarization detector locates text quads and an SVTR/CTC recognizer reads them. LibreYOLO ports it to PyTorch for two tiers.

Tasks
ocr
Sizes
t, l at 960 px
Install
pip install libreyolo
Support tier
Inference only, since v. Predict, validate and export only. Training features do not apply.
Upstream
PaddleOCR (PP-OCRv5) by PaddlePaddle Authors, Apache-2.0. Paper, source
Licenses
Code Apache-2.0, weights Apache-2.0. Commercial use

Install

PP-OCRv5 needs no extra beyond the base package.

bash
pip install libreyolo

Predict

Weights download from Hugging Face on first use and are cached locally.

Python
from libreyolo import LibreYOLO, SAMPLE_IMAGE model = LibreYOLO("LibrePPOCRl-ocr.pt")result = model(SAMPLE_IMAGE, save=True) for text, conf in zip(result.ocr.texts, result.ocr.conf):    print(text, float(conf))
CLI
libreyolo predict model=LibrePPOCRl-ocr.pt source=receipt.jpg save=True
Quads
from libreyolo import LibreYOLO, SAMPLE_IMAGE model = LibreYOLO("LibrePPOCRl-ocr.pt")result = model(SAMPLE_IMAGE) # (N, 4, 2) polygons in reading order: top-left, top-right,# bottom-right, bottom-left. Detection quads are genuine polygons# (rotated text), so they populate result.ocr, not result.boxes.print(result.ocr.data.shape)print(result.ocr.det_conf)

Each checkpoint bundles both stages, detection and recognition, under one .pt file, with the recognition charset and pipeline defaults carried in the checkpoint metadata. The recognizer reads Simplified and Traditional Chinese, English, Japanese and pinyin with one dictionary. result.ocr is an OCRRegions payload: .data holds the four-point polygons, .texts the transcripts, .conf the per-region recognition score, and .det_conf the detection score. Multi-image sources run sequentially: the two-stage pipeline does not batch across images. See prediction for sources, streaming and result handling.

Variants

Two tiers: t, built on lighter PP-LCNetV3/PP-OCRv5_mobile backbones for CPU use, and l, built on PP-HGNetV2 server backbones for higher accuracy. Both tiers run detection at a fixed long-side limit and recognize crops in batches; rec_batch controls how many crops go through the recognizer per forward pass.

Validate

val() measures the pipeline against a directory of images plus a labels/<split>.jsonl file, or the equivalent dataset YAML, each label listing per-image text-region polygons and their transcripts. It reports detection hmean (IoU-matched precision/recall/F1), end-to-end F1 (hmean plus an exact transcript match after normalization, the checkpoint's fitness metric), and 1-NED, the mean normalized edit distance over matched pairs.

Python
from libreyolo import LibreYOLO model = LibreYOLO("LibrePPOCRl-ocr.pt")metrics = model.val(data="my-dataset") print(metrics["metrics/det_hmean"])print(metrics["metrics/e2e_f1"])       # headline metricprint(metrics["metrics/rec_1-NED"])
CLI
libreyolo val model=LibrePPOCRl-ocr.pt data=my-dataset

Export

TaskONNXTorchScriptExecuTorchTensorRTOpenVINOPaddleMNNRKNNncnnTFLiteCoreMLCore AI
ocrocr to ONNX: not supportedocr to TorchScript: not supportedocr to ExecuTorch: not supportedocr to TensorRT: not supportedocr to OpenVINO: not supportedocr to Paddle: not supportedocr to MNN: not supportedocr to RKNN: not supportedocr to ncnn: not supportedocr to TFLite: not supportedocr to CoreML: not supportedocr to Core AI: not supported

PP-OCRv5 is a two-network pipeline, detection and recognition moving together, not one traceable graph, and export is not implemented for it: no format is supported yet. Fine-tune the Apache-2.0 upstream training code directly and convert the result with weights/convert_ppocr_weights.py if you need a checkpoint outside this format.

Checkpoints

Every published weight file for this family.

FileInput (px)Weights license
ocr
LibrePPOCRt-ocr.ptapache-2.0
LibrePPOCRl-ocr.ptapache-2.0

Every file above exists in the LibreYOLO org today and downloads on first use.

Licensing

Check the license on the Hugging Face repository of the specific weights you download. Every checkpoint in the LibreYOLO org carries one, and they are not always the same across a family. That repository is the authoritative source; the summary below describes what applied when this page was last verified.

This is a description of the licenses involved, not legal advice. If the answer matters commercially, read the licenses yourself and take your own counsel.

Original work
PaddleOCR (PP-OCRv5), PaddlePaddle Authors
Upstream license
Apache-2.0
LibreYOLO code
MIT
Weights
Apache-2.0, republished at huggingface.co/LibreYOLO
Interpretation
Apache-2.0 is a permissive license: the architecture, the officially released PP-OCRv5 checkpoints this port converts, and LibreYOLO's own PyTorch port may all be used, modified and redistributed, including commercially, provided the license text and attribution notices travel with any copy. It grants a patent license and places no obligation on your own application code.

Citation

@misc{cui2025paddleocr30technicalreport,
      title={PaddleOCR 3.0 Technical Report}, 
      author={Cheng Cui and Ting Sun and Manhui Lin and Tingquan Gao and Yubo Zhang and Jiaxuan Liu and Xueqing Wang and Zelun Zhang and Changda Zhou and Hongen Liu and Yue Zhang and Wenyu Lv and Kui Huang and Yichao Zhang and Jing Zhang and Jun Zhang and Yi Liu and Dianhai Yu and Yanjun Ma},
      year={2025},
      eprint={2507.05595},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2507.05595}, 
}

Copied from the authors' citation block at github.com/PaddlePaddle/PaddleOCR#citation.

Verified against LibreYOLO v1.5.0. Support tables, checkpoints and benchmark numbers on this page are generated from the released library and the published weights, not written by hand.