Skip to main content

pylopdf-ocr-models

A data-only package containing the PP-OCRv6 small detector, recognizer, and multilingual character dictionary used by pylopdf. The models run locally through pylopdf's pure-Rust RTen backend; OCR does not require a system executable, ONNX Runtime, an ONNX parser at runtime, or network access.

Install it through the main package extra:

pip install "pylopdf[ocr]"

The small PP-OCRv6 tier is intended for mobile and desktop use. Its unified model supports 50 languages, including Japanese, Simplified Chinese, Traditional Chinese, and English.

Bundled artifacts

File Purpose SHA-256
PP-OCRv6_det_small.rten Multilingual text detection 57c5778be784d7aace438a4ea1926864a7b5fd3d49c8e577799f8a83e8dcb022
PP-OCRv6_rec_small.rten Multilingual text recognition b6eef947901c5ff0bf6ee62d8b46f58b1423666f0ae0c87b2f42127502925f8f
ppocrv6_dict.txt Recognition character dictionary b5f2bfe2bdd9448429e3e82b51c789775d9b42f2403d082b00662eb77e401c5d

The installed package also includes these values in SHA256SUMS. Release CI builds the wheel and sdist twice and requires byte-identical output. It then installs both formats into isolated environments, verifies distribution metadata and license files, and streams each installed artifact through SHA-256 before publishing.

The source ONNX artifacts and dictionary are the PP-OCRv6 small files listed in RapidOCR's pinned model manifest and downloaded from its versioned v3.9.2 model repository. They originate from PaddleOCR; RapidOCR converted and distributes the ONNX forms.

Source URL SHA-256
Detector ONNX PP-OCRv6_det_small.onnx 090f04abcd9d9a7498bc4ebf677e4cb9bdce1fe4197ddb7e529f1ef44e1ff94f
Recognizer ONNX PP-OCRv6_rec_small.onnx 6f327246b50388f3c176ae304bd95767ea6dc0c9ae92153ef8cbe210b3c14884
Dictionary ppocrv6_dict.txt b5f2bfe2bdd9448429e3e82b51c789775d9b42f2403d082b00662eb77e401c5d

Reproducing the RTen conversion

After downloading and verifying the source files above, reproduce the bundled model data from the repository root with:

uvx --from rten-convert==0.22.0 rten-convert \
  --no-infer-shapes PP-OCRv6_det_small.onnx PP-OCRv6_det_small.rten
uvx --from rten-convert==0.22.0 rten-convert \
  --no-infer-shapes PP-OCRv6_rec_small.onnx PP-OCRv6_rec_small.rten

rten-convert embeds each source ONNX SHA-256 in the RTen file. Conversion is deterministic: repeating the commands produces the artifact hashes in the first table. Numerical outputs were also checked against the ONNX models before packaging. The character dictionary remains a separate input because RTen's conversion format does not preserve the ONNX recognizer's custom character metadata.

Model copyright is held by Baidu. PaddleOCR and RapidOCR are licensed under Apache License 2.0. See LICENSE and NOTICE.

Metadata

Release files for pylopdf-ocr-models 0.1.0

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

Source distribution (sdist)

Source distribution for pylopdf-ocr-models 0.1.0
File Size Uploaded
pylopdf_ocr_models-0.1.0.tar.gz 26.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for pylopdf-ocr-models 0.1.0
File Interpreter ABI Platform
pylopdf_ocr_models-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 53.2 MB

Release files / pylopdf_ocr_models-0.1.0.tar.gz

Download URL pylopdf_ocr_models-0.1.0.tar.gz
Size 26.6 MB
Tags Source
SHA-256 checksum
How to use checksums
b41c50199465fb53dc41ae72ae33fd96197de764b15ecd3b46b56092b95440df
BLAKE2b-256 checksum
How to use checksums
07646b44b5a824aefce2a1a7ec6cdbae372516b9789b3c06989a815d1e34fb0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 26, 2026.

Transparency log

Release files / pylopdf_ocr_models-0.1.0-py3-none-any.whl

Download URL pylopdf_ocr_models-0.1.0-py3-none-any.whl
Size 26.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
067acc9a39ca0dc7dd2b059c2180f9afa44c101a63d56c944b0b9c340d0c906d
BLAKE2b-256 checksum
How to use checksums
eb2f600942fa646d4005cf7d3fc5ace072ba852f04f14bf5d4b63dc98743c94c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 26, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

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