Introduction

This repository hosts PaddleOCR PP-OCRv6 (the detector + recognizer) for the React Native ExecuTorch library, exported to .pte for the ExecuTorch runtime (XNNPACK, CoreML and Vulkan backends).

If you'd like to run these models in your own ExecuTorch runtime, refer to the official documentation for setup instructions.

PP-OCRv6 is the primary OCR pipeline — smallest and fastest. It ships as one fused .pte per backend, using static bucketed methods. The .pte is a pure tensor→tensor function; all pre/post-processing (resize, normalize, DBNet box decode, perspective crop, CTC decode) is the client's job and is driven by config.json. One model covers all languages (18 709-entry multilingual charset).

Backends

backend target detect recognize
xnnpack CPU int8 (DBNet) fp32 (SVTR)
coreml Apple ANE weight-only int8 weight-only int8
vulkan Android GPU fp16 (GPU) fp32 on XNNPACK (mixed-delegate)

Vulkan is mixed-delegate: DBNet detects on the GPU, but the SVTR recognizer runs on the CPU (XNNPACK). int8 SVTR is lossy on the 18 709-token vocab — so the recognizer stays fp32 on CPU for correctness.

Buckets

is_bucketed() reports [detect sides ; recognize widths]:

  • detect (square sides ÷32): 640, 960, 1280detect_640 / detect_960 / detect_1280 (+ a 1280×640 portrait method detect_640x1280)
  • recognize (widths ÷8, height 48): 160, 320, 480, 640recognize_160 … recognize_640

Detector input is RGB, normalized (x/255 − 0.5)/0.5.

Compatibility

If you intend to use these models outside of React Native ExecuTorch, make sure your runtime is compatible with the ExecuTorch version used to export the .pte files. For more details, see the compatibility note in the ExecuTorch GitHub repository. If you work with React Native ExecuTorch, the library constants guarantee compatibility with the runtime used behind the scenes.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Collection including software-mansion/react-native-executorch-PP-OCRv6