Skip to main content

ocrspine-models

PyPI

The default PP-OCRv5 ONNX model weights for ocrspine's pure-Rust PaddleOCR engine — the shared data companion for the spine document family (pdfspine / pptspine / docspine).

This is a pure-data distribution. The host wheels already contain the OCR code (compiled in) but ship no models; this one package supplies the ~28 MB of weights, so the family keeps exactly one git-tracked copy of the models (in the ocrspine repo) and one published copy of the data wheel.

It is published on PyPIpip install ocrspine-models — though you normally do not install it directly: it is a hard dependency of the hosts, so pip install pdfspine (or pptspine / docspine) pulls it in automatically. The host then resolves the models at runtime by reading ocrspine_models.models_dir() and exporting it as the engine's OCRSPINE_MODELS environment variable. Everything is offline — no model download at runtime.

import ocrspine_models

print(ocrspine_models.models_dir())  # dir holding the 3 ONNX files
print(ocrspine_models.det_path())    # .../ppocrv5_det.onnx
print(ocrspine_models.rec_path())    # .../ppocrv5_rec.onnx
print(ocrspine_models.cls_path())    # .../ppocrv5_cls.onnx
print(ocrspine_models.keys_path())   # .../ppocr_keys_v5.txt

What ships here

file what
ppocrv5_det.onnx PP-OCRv5 text detection (DBNet)
ppocrv5_rec.onnx PP-OCRv5 text recognition (CRNN + CTC), zh/en/ja
ppocrv5_cls.onnx PP-LCNet text-line orientation classifier (180°)
ppocr_keys_v5.txt recognition character dictionary (carried for self-containment)

Only the default zh/en/ja model set ships here. Language-evaluation artifacts that live in the ocrspine repo (e.g. the Thai recognition model) are out of scope.

License

Apache-2.0. The redistributed PP-OCR model weights are Copyright (c) PaddlePaddle Authors (Apache-2.0), converted to ONNX via Paddle2ONNX. See ocrspine_models/NOTICE and ocrspine_models/PROVENANCE.md.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ocrspine_models-0.0.2.tar.gz (25.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ocrspine_models-0.0.2-py3-none-any.whl (25.0 MB view details)

Uploaded Python 3

File details

Details for the file ocrspine_models-0.0.2.tar.gz.

File metadata

  • Download URL: ocrspine_models-0.0.2.tar.gz
  • Upload date:
  • Size: 25.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for ocrspine_models-0.0.2.tar.gz
Algorithm Hash digest
SHA256 5deaae20a5c7404c2d08e8a049e39e33b897af16b26cf75c6965a52b682d2487
MD5 852799beb7cf10cb92ac283168087c0f
BLAKE2b-256 dc8762beff47b30b2a9174e2c0aa57cfd88cf31b4db7912e4bfb786d942cd2d8

See more details on using hashes here.

File details

Details for the file ocrspine_models-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for ocrspine_models-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a8177612fc35e2e75039514957f432702636679dd55cb01f1ba27b615319a11b
MD5 3144dd24f6c4a3fb1f8b1e141f5549b8
BLAKE2b-256 8c5b41906d7b5e757f14b590a3da55c4e8641883f54e9217169cf4fabf0f176d

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.3

2 files

This release

0.0.2 This release

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page