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 PyPI — pip 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.

Metadata

Release files for ocrspine-models 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ocrspine-models 0.0.3
File Size Uploaded
ocrspine_models-0.0.3.tar.gz 25.0 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for ocrspine-models 0.0.3
File Interpreter ABI Platform
ocrspine_models-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 49.9 MB

Release files / ocrspine_models-0.0.3.tar.gz

Download URL ocrspine_models-0.0.3.tar.gz
Size 25.0 MB
Tags Source
SHA-256 checksum
How to use checksums
18517b51b604f9d17973701f633f21ab99a6929b87391ce54b30b4c9ca38f5be
BLAKE2b-256 checksum
How to use checksums
8db9b4da901bc3f5dbeb335631e3074cf0116fbf870a1b642faababdb678fa6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.2

Release files / ocrspine_models-0.0.3-py3-none-any.whl

Download URL ocrspine_models-0.0.3-py3-none-any.whl
Size 25.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
04b00b79f16b1e6331275cbc0d24b69a88d7b28fe6014be152af2d2e67954602
BLAKE2b-256 checksum
How to use checksums
0b5c7fab9ebc0184f0e4198cd30892b12764c73e6a6bd66d41004e0de3c08be1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.2

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release 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