PP-OCRv6 (tiny / small / medium) (fastforks)

PP-OCRv6 (PaddleOCR 3.7, Baidu 2026): a DB text detector (PP-LCNetV4 backbone with a RepLK-FPN neck for tiny and small, a RepLK-PAN neck with IntraCL for medium) finds text lines of any orientation as quads; each line is cut out with a perspective warp and read by a CTC recogniser (PP-LCNetV4; small and medium with an SVTR attention neck) over 6 906 (tiny) or 18 710 (small, medium) characters. Inference as PaddleX's OCR pipeline without the document unwarping and the text-line orientation classifier. The Paddle graphs are exported re-parameterised, so the networks run as the exported operator list (net.Program). 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-OCRv6_medium_det, https://huggingface.co/PaddlePaddle/PP-OCRv6_medium_rec, https://huggingface.co/PaddlePaddle/PP-OCRv6_small_det, https://huggingface.co/PaddlePaddle/PP-OCRv6_small_rec, https://huggingface.co/PaddlePaddle/PP-OCRv6_tiny_det, https://huggingface.co/PaddlePaddle/PP-OCRv6_tiny_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
ppocrv6-medium@1 PP-OCRv6_medium_det/inference.json
PP-OCRv6_medium_det/inference.pdiparams
PP-OCRv6_medium_rec/inference.json
PP-OCRv6_medium_rec/inference.pdiparams
PP-OCRv6_medium_rec/inference.yml
0f1a7ec35da3
85218d2e3d98
0b2e25e990bd
1b01c79a9145
991b700facf5
Apache-2.0 yes
ppocrv6-small@1 PP-OCRv6_small_det/inference.json
PP-OCRv6_small_det/inference.pdiparams
PP-OCRv6_small_rec/inference.json
PP-OCRv6_small_rec/inference.pdiparams
PP-OCRv6_small_rec/inference.yml
89240f689a4a
5043d4ccc8d6
f0bf53c85393
406e1e689c9a
ab078671bb49
Apache-2.0 yes
ppocrv6-tiny@1 PP-OCRv6_tiny_det/inference.json
PP-OCRv6_tiny_det/inference.pdiparams
PP-OCRv6_tiny_rec/inference.json
PP-OCRv6_tiny_rec/inference.pdiparams
PP-OCRv6_tiny_rec/inference.yml
935c18972799
853f7ed317d4
b5b14770c7dc
bb2f8f54d1e2
66170210bad5
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: PaddleOCR does not list the exact training sets of PP-OCRv6 (public and synthetic text data plus Baidu's own data)..

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

Input size

any H x W >= 32, padded to a multiple of 32 Tested up to (portable, fp16, RTX 5060 Ti 16 GB): ppocrv6-medium 1988x2880 (7.5 GiB peak allocated, 7.6 reserved); ppocrv6-small 3000x4000 (6.0 GiB peak allocated, 6.0 reserved); ppocrv6-tiny 3000x4000 (3.8 GiB peak allocated, 4.4 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
ppocrv6-medium 1080x1920 – 490 224 224 2.2x 1.0x 516 / 950 2876 / 2884 2876 / 2884
ppocrv6-small 1080x1920 – 386 88.0 88.0 4.4x 1.0x 415 / 1024 1377 / 1394 1377 / 1394
ppocrv6-tiny 1080x1920 – 203 47.9 47.9 4.2x 1.0x 196 / 355 703 / 718 703 / 718

Startup and first call

model load (s): original portable kernels first call (s): original portable kernels
ppocrv6-medium 1.16 0.26 0.26 1.09 2.33 2.32
ppocrv6-small 0.87 0.15 0.15 1.16 2.24 2.24
ppocrv6-tiny 0.93 0.15 0.15 1.19 2.50 2.50

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)
ppocrv6-medium 1080x1920 224 ms 230 ms 17.4 ms 224 ms 42.0 s 66.3 s 2876 / 2884 2876 / 2904 2876 / 2884 505 / 526
ppocrv6-small 1080x1920 88.0 ms 143 ms 4.49 ms 88.0 ms 46.8 s 54.2 s 1377 / 1394 1377 / 1394 1377 / 1394 224 / 270
ppocrv6-tiny 1080x1920 47.9 ms 55.0 ms 2.00 ms 47.9 ms 50.2 s 46.1 s 703 / 718 703 / 718 703 / 718 228 / 298

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 portable portable fp32 kernels note
ppocrv6-tiny IIIT5K test word crops, word accuracy / normalized edit similarity % 89.33 / 96.90 89.20 / 96.83 89.33 / 96.90
ppocrv6-small IIIT5K test word crops, word accuracy / normalized edit similarity % 96.40 / 99.13 96.37 / 99.13 96.40 / 99.13
ppocrv6-medium IIIT5K test word crops, word accuracy / normalized edit similarity % 97.13 / 99.27 97.13 / 99.27 97.13 / 99.27

Measured on NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks c0606f892, 2026-11-30.

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).
  • The detector and recogniser run as the exported Paddle operator list (no per-layer PyTorch modules); the MLX port interprets the same list (compiled per input shape).

Usage

from fastforks import ocr

model = ocr.load("ppocrv6-medium")  # 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: ppocrv6-medium, ppocrv6-small, ppocrv6-tiny.

Kernels backend

ocr.load("ppocrv6-medium", mode="kernels") runs our CUDA kernels (ocr_levels). 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