Skip to main content

PPOCR-ONNX

简介

利用 onnxruntime 及 PaddleOCR 提供的模型, 对图片中的文字进行检测与识别.

使用模型

  • 文字检测: ch_PP-OCRv3_det_infer
  • 方向分类: cls mobile v2
  • 文字识别: ch_PP-OCRv2_rec_infer

参考

安装

pip install ppocr-onnx

使用

from ppocronnx.predict_system import TextSystem
import cv2

text_sys = TextSystem()

# 识别单行文本
res = text_sys.ocr_single_line(cv2.imread('single_line_text.png'))
print(res)

# 批量识别单行文本
res = text_sys.ocr_lines([cv2.imread('single_line_text.png')])
print(res[0])

# 检测并识别文本
img = cv2.imread('test.png')
res = text_sys.detect_and_ocr(img)
for boxed_result in res:
    print("{}, {:.3f}".format(boxed_result.ocr_text, boxed_result.score))

Metadata

Release files for ppocr-onnx 0.0.3.9

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

Source distribution (sdist)

Source distribution for ppocr-onnx 0.0.3.9
File Size Uploaded Provenance Actions
ppocr-onnx-0.0.3.9.tar.gz 10.5 MB Without provenance Details for ppocr-onnx-0.0.3.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ppocr-onnx 0.0.3.9
File Interpreter ABI Platform Actions
ppocr_onnx-0.0.3.9-py3-none-any.whl Python 3 none any Details for ppocr_onnx-0.0.3.9-py3-none-any.whl

Total release size: 21.0 MB

Release files / ppocr-onnx-0.0.3.9.tar.gz

Download URL ppocr-onnx-0.0.3.9.tar.gz
Size 10.5 MB
Tags Source
SHA-256 checksum
How to use checksums
7148c6a035e01a8e0a37389ac68dd59c1271e799c52348051319dfd0a076359d
BLAKE2b-256 checksum
How to use checksums
ccdc445da1216d93dbc24b558325dc23e0d063a09df393fff9e4689f77605302
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.9

Release files / ppocr_onnx-0.0.3.9-py3-none-any.whl

Download URL ppocr_onnx-0.0.3.9-py3-none-any.whl
Size 10.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
a5c5d89e94b847b31bcacbc07a54cb5cb11eda719b32f5e66a32cd2a7dfd75f0
BLAKE2b-256 checksum
How to use checksums
e5761198f531939532509ff6616b44eda6d3b913f305ff8868eb14406268b484
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.9

Security for ppocr-onnx 0.0.3.9

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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