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.3.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.3-py3-none-any.whl (25.0 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ocrspine_models-0.0.3.tar.gz
Algorithm Hash digest
SHA256 18517b51b604f9d17973701f633f21ab99a6929b87391ce54b30b4c9ca38f5be
MD5 ab539d55a79631b1c36c81a32eaa3e31
BLAKE2b-256 8db9b4da901bc3f5dbeb335631e3074cf0116fbf870a1b642faababdb678fa6b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ocrspine_models-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 04b00b79f16b1e6331275cbc0d24b69a88d7b28fe6014be152af2d2e67954602
MD5 82b1f7f4a82cef3a29bf20ad5c1e9668
BLAKE2b-256 0b5c7fab9ebc0184f0e4198cd30892b12764c73e6a6bd66d41004e0de3c08be1

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 files

0.0.2

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