PP-OCRv5 (server / mobile) (fastforks)

PP-OCRv5 (PaddleOCR 3, Baidu 2025): a DB text detector (PP-HGNetV2 + LKPAN for server, PP-LCNetV3 + RSE-FPN for mobile) finds text lines of any orientation as quads; each line is cut out with a perspective warp and read by a CTC recogniser (PP-HGNetV2 / PP-LCNetV3 with an SVTR neck) over 18 383 characters (simplified and traditional Chinese, English, Japanese, pinyin). Inference as PaddleX's OCR pipeline without the document unwarping and the text-line orientation classifier. The portable module() is the detector with its normalisation.

This repo is the model card only: it holds no weights. fastforks downloads the authors' weights from the links below and checks them against the SHA-256 in the model card. Code: https://github.com/kleinicke/fastforks. Kernels for the kernels backend: https://huggingface.co/fastforks/kernels. Original code: https://github.com/PaddlePaddle/PaddleOCR at dab3fe353790.

Author weight repos: https://huggingface.co/PaddlePaddle/PP-OCRv5_mobile_det, https://huggingface.co/PaddlePaddle/PP-OCRv5_mobile_rec, https://huggingface.co/PaddlePaddle/PP-OCRv5_server_det, https://huggingface.co/PaddlePaddle/PP-OCRv5_server_rec.

Task: ocr. Tier: experimental. Outputs: boxes, texts, scores. Backends: portable, kernels.

Input: one RGB image. Output: the text lines in reading order: a quad [N, 4, 2] per line, its text and a confidence [N] (text detector + recogniser; recognisers alone read the whole image as one line).

Variants

Weights are the authors' files (not hosted here). SHA-256 shortened to 12 hex digits; the full hashes are in card.toml.

variant weights (author link) SHA-256 weights licence commercial use
ppocrv5-mobile@1 PP-OCRv5_mobile_det/inference.json
PP-OCRv5_mobile_det/inference.pdiparams
PP-OCRv5_mobile_rec/inference.json
PP-OCRv5_mobile_rec/inference.pdiparams
PP-OCRv5_mobile_rec/config.json
05feef1acb00
afa1820cb16c
24587345250c
2460da908759
6df1587ae056
Apache-2.0 yes
ppocrv5-server@1 PP-OCRv5_server_det/inference.json
PP-OCRv5_server_det/inference.pdiparams
PP-OCRv5_server_rec/inference.json
PP-OCRv5_server_rec/inference.pdiparams
PP-OCRv5_server_rec/config.json
af5876933d88
183146fe9d99
8e6e12e5d425
63853f062a5f
6a780e213d7a
Apache-2.0 yes

Licence

Original-code strings, recorded as they are (research-use package; check them before any other use). Code: Apache-2.0. Licence files: LICENSE.

Training data: The PP-OCRv5 technical report describes public and synthetic text data plus Baidu's own data; the exact sets are not listed..

Licence evidence: https://github.com/PaddlePaddle/PaddleOCR/blob/dab3fe35379033fdcb2d0e9572fac0b36c9a9ebf/LICENSE ; https://huggingface.co/PaddlePaddle/PP-OCRv5_server_det

Input size

any H x W >= 32, padded to a multiple of 32 Tested up to (portable, fp16, RTX 5060 Ti 16 GB): ppocrv5-mobile 3000x4000 (1.4 GiB peak allocated, 2.3 reserved); ppocrv5-server 3000x4000 (7.1 GiB peak allocated, 9.8 reserved)

Speed and memory

Ocr, synthetic

model input time (ms): original fp32 original portable kernels kernels speed-up: vs original vs portable peak memory (MiB, allocated / reserved): original portable kernels
ppocrv5-mobile 1080x1920 619 418 153 156 2.7x 1.0x 393 / 1005 289 / 448 289 / 448
ppocrv5-server 1080x1920 – 762 (fp32) 279 231 3.3x 1.2x 2355 / 2901 615 / 752 607 / 654

Startup and first call

model load (s): original portable kernels first call (s): original portable kernels
ppocrv5-mobile 1.51 0.27 0.41 1.82 2.82 3.00
ppocrv5-server 2.07 0.56 1.07 2.03 1.87 1.11

torch.compile and TensorRT

model input time: portable compile TensorRT (fp16 unless shown) kernels preparation: compile (cold first call) ONNX + engine build peak MiB (alloc / reserved): portable compile kernels TensorRT (engine + torch)
ppocrv5-mobile 1080x1920 153 ms 115 ms 2.68 ms 156 ms 75.0 s 156 s 289 / 448 292 / 448 289 / 448 241 / 268
ppocrv5-server 1080x1920 279 ms 277 ms 25.1 ms 231 ms 105 s 40.6 s 615 / 752 958 / 1132 607 / 654 1131 / 1146

Fixed-size cells: time (ms) / peak allocated / peak reserved memory (MiB).

Hardware, protocol and caveats: benchmarks (RTX 5060 Ti 16 GB, sm_120). Original = the original code named above at the precision of portable (fp16, or (fp32) where fp16 is unsupported or not finite); original fp32 = its default fp32 run. Peak memory is the torch allocator's.

Accuracy

On public datasets

The 3,000 official cropped test words, with no lexicon. Exact accuracy and normalized edit similarity compare lowercase ASCII letters and digits. Similarity is one minus edit distance divided by the longer word's length, averaged over the crops. For a model that also detects text, this benchmark runs only its recognition network on the supplied word crop. Original = the original code named under Details, same checkpoint and protocol.

variant dataset original fp32 portable portable fp32 kernels note
ppocrv5-server IIIT5K test word crops, word accuracy / normalized edit similarity % 94.80 / 98.26 94.80 / 98.27 94.80 / 98.26 94.80 / 98.25
ppocrv5-mobile IIIT5K test word crops, word accuracy / normalized edit similarity % 89.43 / 96.19 89.40 / 96.18 89.40 / 96.19 89.40 / 96.18

Measured on portable: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 5f4a908a0, 2026-11-19; portable32: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 3bf0bac7, 2026-11-18; kernels: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 67dbea00, 2026-11-20.

Parity with the original code

Every variant is checked against reference outputs of the original code at its pinned commit. CPU, float32: max |diff| <= 0.001 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.5 and p99 <= 1.5 (absolute error of the output boxes).

Limitations

  • No document orientation / unwarping and no text-line orientation classifier (upside-down lines are read as they are).
  • The DB post-processing runs on the CPU (OpenCV-exact geometry); hole contours of the binary map are not boxed (upstream boxes them too; they rarely pass box_threshold).

Usage

from fastforks import ocr

model = ocr.load("ppocrv5-mobile")  # mode="auto": the preferred backend from recorded measurements
result = model("receipt.jpg")
result.texts  # the text lines in reading order
result.boxes, result.scores  # [N, 4, 2] quads in input pixels, [N] confidences
result.backend  # what ran, e.g. Backend(mode='portable', device='cuda:0', dtype='float16')

Install with pip install fastforks (see https://github.com/kleinicke/fastforks). Other variants: ppocrv5-mobile, ppocrv5-server.

Kernels backend

ocr.load("ppocrv5-mobile", mode="kernels") runs our CUDA kernels (ocr_levels, igev, cutlass_conv, cudnn_hacc). It needs a prebuilt kernel for your GPU architecture (downloaded from https://huggingface.co/fastforks/kernels on first use) and a recent NVIDIA driver; if there is none it raises BackendUnavailableError with the reason and never falls back silently. mode="auto" picks kernels when it can run and logs the choice.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for fastforks/ppocrv5

Finetuned
(5)
this model

Collection including fastforks/ppocrv5