Models · Text recognition (OCR)

PP-OCRv5 (server / mobile)

PP-OCRv5 (Baidu, PaddleOCR 3, 2025): finds the text lines of a photo or document page in any orientation and reads them; Chinese (simplified and traditional), English, Japanese and pinyin; a server and a mobile version. Apache-2.0 code and weights.

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

Checkpoint

Paper 2025 Added in 0.2.0 Evaluated with 0.2.0

Portable, RTX 5060 Ti 16 GB 277 ms 1080x1920, fp16
vs the faster original 2.8× original fp32: 762 ms
Peak memory 1,357 MiB original: 2,355 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("ppocrv5-server")  # kernels on a supported GPU, else portable PyTorch
result = model(image)
result.boxes  # also: texts, scores
result.backend  # what ran: mode, device, dtype, kernels
fastforks bench ppocrv5-server

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 fp32fp32not measured ––––
Original (own default)PaddleOCR 3 3.3.3 / paddle 3.3.1 OCR pipeline (GPU Paddle Inference, run mode ['paddle']), no orientation / unwarping / text-line classifier; fp32 only: PaddleOCR's float16 needs TensorRT, and Paddle Inference float16 reads no text (detector overflow)fp32 762–2,355 MiB/2,901 MiB2.12.03
Portable fp32fp32not measured ––––
Portablefp16 2772.8×1,357 MiB/1,452 MiB0.61.87
Kernelsnot measured ––––
Portable + torch.compile 2772.8×958 MiB/1,132 MiB105 (build)–
TensorRT fp16fp16 25.130×978 MiBenginenot comparable41 (build)–

Measured on RTX 5060 Ti 16 GB, torch 2.14.1+cu130, 2026-11-14. 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

DeviceBackenddtypems / callPeak memoryOutput vs referenceInput
Apple M1 Pro 16 GB MPS, torch 2.14.1, 2026-11-15Originalfp32cannot run here–1080x1920
Portablefp161607 6,545 MiB processmatches1080x1920
Portablefp322067 10,208 MiB processmatches1080x1920
Kernelsfp32not implemented–1080x1920

CUDA memory is torch’s peak allocated / reserved; Apple has no such counter, so the Mac rows show the process footprint (weights, Python and torch included). “Output vs reference” compares the device’s output with the stored golden output under the card’s tolerance; – = not checked on that device. Kernels “not implemented” = no kernels for this model on that backend yet: it runs portable there.

Licence and weights

Commercial use allowed

Code
Apache-2.0 LICENSE
Weights
Apache-2.0 source
Training data
The PP-OCRv5 technical report describes public and synthetic text data plus Baidu's own data; the exact sets are not listed.

Our reading of the licences, not legal advice.

Weights

PP-OCRv5_server_det/inference.json 402 KB· hosted on Hugging Face
PP-OCRv5_server_det/inference.pdiparams 87.9 MB· hosted on Hugging Face
PP-OCRv5_server_rec/inference.json 325 KB· hosted on Hugging Face
PP-OCRv5_server_rec/inference.pdiparams 84.4 MB· hosted on Hugging Face
PP-OCRv5_server_rec/config.json 352 KB· hosted on Hugging Face

fastforks downloads and checks these files on first use (fastforks download ppocrv5-server).

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 fp32fp3294.8098.26 3000 –
Portablenot measured
Kernelsnot measured

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 3bf0bac7, 2026-11-18.

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
GPU default dtypes, p99 |diff|≤ 1.5 0

Recorded for ppocrv5-server on RTX 5060 Ti, torch 2.10.0+cu130, 2026-11-17, with these kernels: cudnn_hacccutlass_convigevocr_levels

Details

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.

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 (7,268 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
Checkpoint
server=true
CUDA kernels
  • ocr_levels
  • igevIGEV stereo: convolution epilogues, correlation lookups, GRU gates
  • cutlass_convCUTLASS convolutions with the recurrent update (GRU) fused in
  • cudnn_haccconvolutions with fp16 accumulation (cuDNN)
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`).
Full reference, generated from the repository

PP-OCRv5 (Baidu, PaddleOCR 3, 2025): finds the text lines of a photo or document page in any orientation and reads them; Chinese (simplified and traditional), English, Japanese and pinyin; a server and a mobile version. Apache-2.0 code and weights.

Commercial use: yes.

variantinputbackendtime (ms)peak memory (MiB, allocated / reserved)
ppocrv5-serversynthetic (1080x1920)original
portable
kernels
portable + torch.compile
TensorRT fp16
762
277
–
277
25.1
2355 / 2901
1357 / 1452
–
958 / 1132
1131 / 1146
ppocrv5-mobilesynthetic (1080x1920)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
619
418
153
–
115
2.68
476 / 1094
393 / 1005
289 / 448
–
292 / 448
241 / 268
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-OCRv5_server_det
  • Training data: The PP-OCRv5 technical report describes public and synthetic text data plus Baidu's own data; the exact sets are not listed.
  • 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, igev, cutlass_conv, cudnn_hacc
  • Variants: ppocrv5-server, ppocrv5-mobile
  • 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): ppocrv5-server 3000x4000 (7.1 GiB peak allocated, 9.8 reserved); ppocrv5-mobile 3000x4000 (1.4 GiB peak allocated, 2.3 reserved)
  • ppocrv5-server 1080x1920, first call: portable + torch.compile 105 s (cold Inductor cache), TensorRT fp16 41 s (ONNX + engine).
  • ppocrv5-mobile 1080x1920, first call: portable + torch.compile 75 s (cold Inductor cache), TensorRT fp16 156 s (ONNX + engine).
  • ppocrv5-server original 1080x1920: PaddleOCR 3 3.3.3 / paddle 3.3.1 OCR pipeline (GPU Paddle Inference, run mode ['paddle']), no orientation / unwarping / text-line classifier; fp32 only: PaddleOCR's float16 needs TensorRT, and Paddle Inference float16 reads no text (detector overflow)
  • ppocrv5-mobile original (fp32) 1080x1920: PaddleOCR 3 3.3.3 / paddle 3.3.1 OCR pipeline (GPU Paddle Inference, run mode ['paddle']), no orientation / unwarping / text-line classifier
  • ppocrv5-mobile 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
  • ppocrv5-server load / first call: original 2.07 s / 2.032 s, portable 0.56 s / 1.874 s
  • ppocrv5-mobile load / first call: original 1.51 s / 1.82 s, portable 0.27 s / 2.819 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.

variantdatasetportable fp32note
ppocrv5-serverIIIT5K test word crops, word accuracy / normalized edit similarity %94.80 / 98.26

Measured on NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 3bf0bac7, 2026-11-18.

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
ppocrv5-server0.0 / 0.0RTX 5060 Ti, torch 2.10.0+cu130cudnn_hacc@cudnn91501, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120, ocr_levels@3187ecc54497:sm_120
ppocrv5-mobile0.0625 / 1.0RTX 5060 Ti, torch 2.10.0+cu130cudnn_hacc@cudnn91501, cutlass_conv@988138e042cb:sm_120, igev@f075827d68c6:sm_120, ocr_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).

Example output

No example rendered for this checkpoint yet.