Models · Text recognition (OCR)

PP-OCRv6 (tiny / small / medium)

PP-OCRv6 (Baidu, PaddleOCR 3.7, 2026): finds the text lines of a photo or document page and reads them, like PP-OCRv5 with newer, re-parameterised networks; Chinese (simplified and traditional), English, Japanese and more; a tiny, a small and a medium version. Apache-2.0 code and weights.

experimental Fork of PaddlePaddle/PaddleOCR@dab3fe3 · backends: portable, kernels

Checkpoint

Paper 2026 Added in 0.4.0 Evaluated with 0.4.0

Kernels, RTX 5060 Ti 16 GB 47.9 ms 1080x1920, fp16
vs the faster original 4.2× original fp16: 203 ms
Peak memory 703 MiB original: 196 MiB
Accuracy vs original fp32 – original not run on the test set

Use it

pip install fastforks

Lean install with only what this model needs: pip install fastforks-core

from fastforks import ocr

model = ocr.load("ppocrv6-tiny")  # fastest backend that runs here
result = model("photo.jpg")

# result fields: texts, boxes, scores
texts = result.texts  # list of strings
arrays = result.numpy()  # the tensor fields as NumPy arrays: arrays["boxes"]
result.backend  # what ran: mode, device, dtype
Other ways to run it
  • Backend: ocr.load("ppocrv6-tiny", mode="kernels") # or "portable", "auto" (default)
  • Precision: ocr.load("ppocrv6-tiny", dtype="float32") # full precision: slower, portable only
  • Options: ocr.load("ppocrv6-tiny", options={"box_threshold": 0.6, "unclip_ratio": 1.5})
fastforks bench ppocrv6-tiny

Times the model on this machine. load(…, mode="portable") or mode="kernels" picks a backend; usage guide.

Speed and memory

Every backend on one GPU (RTX 5060 Ti 16 GB) and the same input, the authors’ code included. Kernels runs fp16. Portable runs fp16 on CUDA.

Input: synthetic, 1080x1920 (the task’s standard size)

BackenddtypeTime per call (ms)vs original fp16Peak memory
allocated / reserved
Load (s)First call (s)
Original fp32PaddleOCR 3 3.3.3 / paddle 3.3.1 OCR pipeline (GPU Paddle Inference, run mode ['paddle']), no orientation / unwarping / text-line classifier; paddlex 3.3 has no PP-OCRv6 class: the v5 class of the same size tier (mobile for tiny/small, server for medium) runs the v6 export dirsfp32 2100.97×231 MiB/398 MiB0.91.19
Original fp16PaddleOCR 3 3.3.3 / paddle 3.3.1 OCR pipeline (GPU Paddle Inference, run mode ['paddle_fp16']), no orientation / unwarping / text-line classifier; paddlex 3.3 has no PP-OCRv6 class: the v5 class of the same size tier (mobile for tiny/small, server for medium) runs the v6 export dirsfp16 203–196 MiB/355 MiB1.01.13
Portable fp32fp32not measured ––––
Portablefp16 47.94.2×703 MiB/718 MiB0.12.50
Kernelsfp16 47.94.2×703 MiB/718 MiB0.12.50
Portable + torch.compile 55.03.7×703 MiB/718 MiB50 (build)–
TensorRT fp16fp16 2.00102×154 MiBenginenot comparable46 (build)–

Measured on RTX 5060 Ti 16 GB, torch 2.14.1+cu130, 2026-11-28. First call, 3 warm-up, peak reset, median of 3 rounds x median of 5. Ratios divide two times of this table (same GPU, same input). Original fp16 is the authors’ own precision option, else torch.autocast. torch.compile and TensorRT: build time instead of load time. TensorRT memory (engine, not comparable) is the GPU memory the engine took, read from the driver because TensorRT allocates outside PyTorch, so it can't be compared with the PyTorch peaks of the other rows.

Other devices

Not measured on other devices yet.

Licence and weights

Commercial use allowed

Code
Apache-2.0 LICENSE
Weights
Apache-2.0 source
Training data
PaddleOCR does not list the exact training sets of PP-OCRv6 (public and synthetic text data plus Baidu's own data).

Our reading of the licences, not legal advice.

Weights

PP-OCRv6_tiny_det/inference.json 229 KB· hosted on Hugging Face
PP-OCRv6_tiny_det/inference.pdiparams 1.7 MB· hosted on Hugging Face
PP-OCRv6_tiny_rec/inference.json 109 KB· hosted on Hugging Face
PP-OCRv6_tiny_rec/inference.pdiparams 4.4 MB· hosted on Hugging Face
PP-OCRv6_tiny_rec/inference.yml 55.6 KB· hosted on Hugging Face

fastforks downloads and checks these files on first use (fastforks download ppocrv6-tiny).

Accuracy

The test set through the authors’ code and through ours: same checkpoint, same protocol. The distance between the original’s fp32 and fp16 runs is what half precision alone costs; our runs should stay within it.

IIIT5K test word crops

word accuracy / normalized edit similarity %

Rundtypeword_accuracy ↑ned ↑wordsms / word
Original fp32not measured
Original fp16not measured
Portable fp32fp3289.2096.83 3000 2.76
Portablefp1689.3396.90 3000 3.15
Kernelsfp1689.3396.90 3000 3.13

The original code was not run on this dataset, so the table cannot show the distance to it.

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. Measured on RTX 5060 Ti, torch 2.14.1+cu130, fastforks c0606f892, 2026-11-30.

Closeness to the original

Beyond the test-set scores: the raw output of ours against the original’s fp32 output on the same input, pixel by pixel. 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).

CheckToleranceMeasured
CPU fp32, max |diff|≤ 0.001 not recorded
GPU default dtypes, mean |diff|≤ 0.5 0.02083
GPU default dtypes, p99 |diff|≤ 1.5 1

Recorded for ppocrv6-tiny on RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-28, with these kernels: ocr_levels

Details

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.

Input / output
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).
Input size
any H x W >= 32, padded to a multiple of 32; tested up to 3000x4000 (3,892 MiB allocated)
Options
  • box_threshold=0.60.0 to 1.0· changes the output
  • unclip_ratio=1.5>= 0.1· changes the output
Outputs
boxes, texts, scores
CUDA kernels
  • ocr_levels
Apple (MPS)
fp32, fp16

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).
Full reference, generated from the repository

PP-OCRv6 (Baidu, PaddleOCR 3.7, 2026): finds the text lines of a photo or document page and reads them, like PP-OCRv5 with newer, re-parameterised networks; Chinese (simplified and traditional), English, Japanese and more; a tiny, a small and a medium version. Apache-2.0 code and weights.

Commercial use: yes.

variantinputbackendtime (ms)peak memory (MiB, allocated / reserved)
ppocrv6-tinysynthetic (1080x1920)original
portable
kernels
portable + torch.compile
TensorRT fp16
203
47.9
47.9
55.0
2.00
196 / 355
703 / 718
703 / 718
703 / 718
228 / 298
ppocrv6-smallsynthetic (1080x1920)original
portable
kernels
portable + torch.compile
TensorRT fp16
386
88.0
88.0
143
4.49
415 / 1024
1377 / 1394
1377 / 1394
1377 / 1394
224 / 270
ppocrv6-mediumsynthetic (1080x1920)original
portable
kernels
portable + torch.compile
TensorRT fp16
490
224
224
230
17.4
516 / 950
2876 / 2884
2876 / 2884
2876 / 2904
505 / 526
Details
  • Original code: https://github.com/PaddlePaddle/PaddleOCR at dab3fe353790
  • Code licence: Apache-2.0 (permissive); files: LICENSE
  • Weights licence: Apache-2.0
  • Licence evidence: https://github.com/PaddlePaddle/PaddleOCR/blob/dab3fe35379033fdcb2d0e9572fac0b36c9a9ebf/LICENSE ; https://huggingface.co/PaddlePaddle/PP-OCRv6_medium_det
  • Training data: PaddleOCR does not list the exact training sets of PP-OCRv6 (public and synthetic text data plus Baidu's own data).
  • Options: box_threshold = 0.6 (0.0 to 1.0; also text_det_box_thresh), unclip_ratio = 1.5 (>= 0.1; also text_det_unclip_ratio)
  • Kernel libraries: ocr_levels
  • Variants: ppocrv6-tiny, ppocrv6-small, ppocrv6-medium
  • Outputs: boxes, texts, scores
  • Input size: any H x W >= 32, padded to a multiple of 32
  • Tested up to (portable, fp16, RTX 5060 Ti 16 GB): ppocrv6-tiny 3000x4000 (3.8 GiB peak allocated, 4.4 reserved); ppocrv6-small 3000x4000 (6.0 GiB peak allocated, 6.0 reserved); ppocrv6-medium 1988x2880 (7.5 GiB peak allocated, 7.6 reserved)
  • ppocrv6-tiny 1080x1920, first call: portable + torch.compile 50 s (cold Inductor cache), TensorRT fp16 46 s (ONNX + engine).
  • ppocrv6-small 1080x1920, first call: portable + torch.compile 47 s (cold Inductor cache), TensorRT fp16 54 s (ONNX + engine).
  • ppocrv6-medium 1080x1920, first call: portable + torch.compile 42 s (cold Inductor cache), TensorRT fp16 66 s (ONNX + engine).
  • ppocrv6-tiny original 1080x1920: PaddleOCR 3 3.3.3 / paddle 3.3.1 OCR pipeline (GPU Paddle Inference, run mode ['paddle_fp16']), no orientation / unwarping / text-line classifier; paddlex 3.3 has no PP-OCRv6 class: the v5 class of the same size tier (mobile for tiny/small, server for medium) runs the v6 export dirs
  • ppocrv6-small original 1080x1920: PaddleOCR 3 3.3.3 / paddle 3.3.1 OCR pipeline (GPU Paddle Inference, run mode ['paddle_fp16']), no orientation / unwarping / text-line classifier; paddlex 3.3 has no PP-OCRv6 class: the v5 class of the same size tier (mobile for tiny/small, server for medium) runs the v6 export dirs
  • ppocrv6-medium original 1080x1920: PaddleOCR 3 3.3.3 / paddle 3.3.1 OCR pipeline (GPU Paddle Inference, run mode ['paddle_fp16']), no orientation / unwarping / text-line classifier; paddlex 3.3 has no PP-OCRv6 class: the v5 class of the same size tier (mobile for tiny/small, server for medium) runs the v6 export dirs
  • ppocrv6-tiny load / first call: original 0.93 s / 1.192 s, portable 0.15 s / 2.505 s, kernels 0.15 s / 2.503 s
  • ppocrv6-small load / first call: original 0.87 s / 1.163 s, portable 0.15 s / 2.24 s, kernels 0.15 s / 2.237 s
  • ppocrv6-medium load / first call: original 1.16 s / 1.093 s, portable 0.26 s / 2.325 s, kernels 0.26 s / 2.318 s
  • Protocol, first call, 3 warm-up, peak reset, median of 3 rounds x median of 5

Measured

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.

variantdatasetportableportable fp32kernelsnote
ppocrv6-tinyIIIT5K test word crops, word accuracy / normalized edit similarity %89.33 / 96.9089.20 / 96.8389.33 / 96.90
ppocrv6-smallIIIT5K test word crops, word accuracy / normalized edit similarity %96.40 / 99.1396.37 / 99.1396.40 / 99.13
ppocrv6-mediumIIIT5K test word crops, word accuracy / normalized edit similarity %97.13 / 99.2797.13 / 99.2797.13 / 99.27

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

Parity

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).

variantkernels error vs original, mean / p99GPU, torchkernels used
ppocrv6-tiny0.02083 / 1.0RTX 5060 Ti, torch 2.14.1+cu130ocr_levels@3187ecc54497:sm_120
ppocrv6-small0.0 / 0.0RTX 5060 Ti, torch 2.14.1+cu130ocr_levels@3187ecc54497:sm_120
ppocrv6-medium0.0 / 0.0RTX 5060 Ti, torch 2.14.1+cu130ocr_levels@3187ecc54497:sm_120

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).

Example output

No example rendered for this checkpoint yet.