Loading…
Loading…
PaddlePaddle's PP-OCRv6 small text detection and recognition models, converted to Core ML ML programs (16-bit floating point) for OhMyShot, a screenshot app for macOS, which downloads them as a model pack to read text that macOS's own text recognition reads poorly (Chinese-heavy interfaces, low-confidence regions). The weights are PaddlePaddle's, unchanged; see LICENSE.txt for the license and what was changed.
| File | What it is |
|---|---|
det.mlpackage |
Text detection (DB): input x, 1 × 3 × H × W, output prob, 1 × 1 × H × W. Sizes: 640×640, 640×1280, 640×2560, 640×4096, 1280×640, 1280×1280, 1280×2560, 1280×4096. |
rec.mlpackage |
Text recognition (CTC): input x, 1 × 3 × 48 × W, output probs, softmax over 18710 classes. Widths: 160, 320, 480, 640, 800, 960, 1280, 1600, 2000, 2400, 3200, 4000. |
characters.txt |
The recognition model's characters, one a line: class 1 is the first line; class 0 is the blank and the class after the last line a space. |
config.json |
Pre- and post-processing: normalization, the bands a region is read in, detection thresholds. |
LICENSE.txt |
Apache License 2.0, with what was changed. |
Inputs are padded with zeros up to the smallest listed size that holds them. Run on the CPU and the Neural Engine
(.cpuAndNeuralEngine); macOS 27 beta's GPU path fails on these models.
Made with Tools/model-packs/ppocr_pack.py from these upstream revisions, and checked against PaddlePaddle's ONNX
exports of the same models:
Checked against the OhMyShot OCR benchmark (40 cases, 12 of them crops of real screenshots): every case read, mean content character error rate 2.40% over the 38 cases scored, against 2.59% for the same models at any input size with PaddlePaddle's own pre- and post-processing. Korean (not in the model) and vertical Chinese (read right, but scored in another order) are left out of both.
PaddlePaddle/PP-OCRv6_small_det_safetensors