PPOCR-ONNX
简介
利用 onnxruntime 及 PaddleOCR 提供的模型, 对图片中的文字进行检测与识别.
使用模型
- 文字检测:
ch_PP-OCRv3_det_infer - 方向分类:
cls mobile v2 - 文字识别:
ch_PP-OCRv2_rec_infer
参考
- PaddleOCR
- 手把手教你使用ONNXRunTime部署PP-OCR
ch_PP-OCRv3_det_infer及ch_PP-OCRv2_rec_infer模型来自 RapidAI/RapidOCR
安装
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 v-ppocr-onnx 0.0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| v-ppocr-onnx-0.0.4.1.tar.gz | 12.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| v_ppocr_onnx-0.0.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.6 MB
Release files / v-ppocr-onnx-0.0.4.1.tar.gz
| Download URL | v-ppocr-onnx-0.0.4.1.tar.gz |
|---|---|
| Size | 12.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d871adb4bd23347c974de94abf6b41f95b5524da635e11a5694241e80b34bdb0
|
|
BLAKE2b-256 checksum How to use checksums |
de1f495d8879015e2a3cd280e6366a08c6035d8731a370ff717f980ad4417cb0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.14
|
Release files / v_ppocr_onnx-0.0.4.1-py3-none-any.whl
| Download URL | v_ppocr_onnx-0.0.4.1-py3-none-any.whl |
|---|---|
| Size | 12.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9884494a3e04e0abc1e08be6d8c5cc5ca965bd2e7d71a716bab9f2ba7a55d7e7
|
|
BLAKE2b-256 checksum How to use checksums |
028391967d5584fa6742b7a693ddf5b6d41476444016a82ca6f4930ac468f9dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.14
|