利用 onnxruntime 及 PaddleOCR 提供的模型, 对图片中的文字进行检测与识别.
Project description
PPOCR-ONNX
简介
利用 onnxruntime 及 PaddleOCR 提供的模型, 对图片中的文字进行检测与识别.
使用模型
- 文字检测:
ch_PP-OCRv2_det_infer
- 方向分类:
cls mobile v2
- 文字识别:
rec mobile v2
安装
pip install ppocr-onnx
使用
识别分行的文本(每行一张图片, RGB 格式)
from ppocronnx import TextSystem
import cv2
ts = TextSystem()
img = cv2.imread('test.png')
print(ts.ocr_lines([img]))
文本检测及识别
from ppocronnx import TextSystem
import cv2
ts = TextSystem()
img = cv2.imread('test.png')
print(ts.detect_and_ocr(img))
参考
- PaddleOCR
- 手把手教你使用ONNXRunTime部署PP-OCR
ch_PP-OCRv2_det_infer
模型来自 RapidAI/RapidOCR
Project details
Release history Release notifications | RSS feed
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.2.tar.gz
(19.1 kB
view hashes)
Built Distribution
Close
Hashes for ppocr_onnx-0.0.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef2e367f75d63dca501748418dfabb096de8bf542106602305c4967feb8591ea |
|
MD5 | 37145d1695f5c71abb267073c7c771d5 |
|
BLAKE2b-256 | e18d3f64a80b04b4925d6abca70f4ece61465776a5aef754102943a2a710203f |