PP-OCRv6 Medium Core ML

Core ML FP16 conversion of the official PaddlePaddle PP-OCRv6 Medium text detection and recognition models.

Models

Artifact Input Output
PPOCRv6MediumDetSplit.mlmodelc Float32 BGR tensor, 1 x 3 x 1280 x 1280 Float32 text probability map, 1 x 1 x 1280 x 1280
PPOCRv6MediumRec.mlmodelc Float32 BGR tensor, height 48; widths 320, 640, 960, 1280, 1920, 2560, 3200 CTC character probabilities

The models target iOS 17 and later. Weights and internal computation use FP16. Configure Core ML with MLComputeUnits.all to let the runtime choose available compute devices. Device placement and latency depend on the device and OS.

The detector's eight 9 x 9 convolutions are represented by four spatial kernel tiles (5 x 5, 5 x 4, 4 x 5, 4 x 4), followed by summation. This preserves the mathematical convolution without retraining; FP16 rounding can change probabilities.

Preprocessing and decoding

Resize detection images with the longest side at 1280, preserve aspect ratio, normalize BGR channels using mean [0.485, 0.456, 0.406] and standard deviation [0.229, 0.224, 0.225], and zero-pad the normalized tensor to 1280 x 1280. Crop detected text lines from the full-resolution oriented source image. Resize recognition crops to height 48, normalize BGR values to [-1, 1], and pad to a supported width. Decode with the supplied characters.json, CTC blank index 0, and repeated-token collapse.

Source and conversion

Model Upstream repository Pinned revision
Detection PaddlePaddle/PP-OCRv6_medium_det_safetensors 4236c2b61741a259c091fd879dcc4edc339e916c
Recognition PaddlePaddle/PP-OCRv6_medium_rec_safetensors 024cad6a831de75c2c3c26e711ba8c4a82ccd24b

Converted with PyTorch 2.7.0, Transformers 5.20.2, coremltools 9.0, and Apple's Core ML compiler. The generated model-manifest.json records the release version, artifact paths, exact sizes, SHA-256 hashes, and upstream weight hashes.

License

The original models are published by PaddlePaddle under Apache-2.0. The original license text is included as models/PaddleOCR-LICENSE.txt. This conversion changes precision and the detector convolution representation as described above.

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