Skip to main content

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

Project description

PPOCR-ONNX

简介

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

使用模型

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

参考

安装

pip install ppocr-onnx

使用

from ppocronnx.predict_system import TextSystem
import cv2

text_sys = TextSystem()

# 识别单行文本
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))

Project details


Download files

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

Source Distribution

ppocr-onnx-0.0.3.3.tar.gz (6.6 MB view details)

Uploaded Source

Built Distribution

ppocr_onnx-0.0.3.3-py3-none-any.whl (6.6 MB view details)

Uploaded Python 3

File details

Details for the file ppocr-onnx-0.0.3.3.tar.gz.

File metadata

  • Download URL: ppocr-onnx-0.0.3.3.tar.gz
  • Upload date:
  • Size: 6.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for ppocr-onnx-0.0.3.3.tar.gz
Algorithm Hash digest
SHA256 ee76ecc3bcce0b1a58270c5843f080900f4efbf5051bec0bb47ea59e3fa46547
MD5 1fd4994d837772233c7ea7b1c89ef321
BLAKE2b-256 6e120123a71f355555fbb2d3f85f3684949d8d8f409d79f690c59131ef13880f

See more details on using hashes here.

File details

Details for the file ppocr_onnx-0.0.3.3-py3-none-any.whl.

File metadata

  • Download URL: ppocr_onnx-0.0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 6.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for ppocr_onnx-0.0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 89d5d0aee5aa55111af7b31ffb786d7565be8f58d4c88ba7c3276f305c270c61
MD5 67b38244bdc2543f0acccf0e947463e3
BLAKE2b-256 444f5020ea7be3b157de0e966bf2fe366ccae3cf263dec405d1f5e911aa2121e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page