/pponnxcr

OCR based on onnxruntime with PaddleOCR models

Primary LanguagePythonGNU Affero General Public License v3.0AGPL-3.0

pponnxcr - PaddlePaddle ONNXruntime OCR

OCR based on ONNX Runtime with PaddleOCR models
Refractor by @hgjazhgj for ppocr-onnx and implements:

  • Update rec model to v3
  • Remove all unnecessary components e.g. draw-ocr
  • Add English, Japanese and TraditionalChinese language support

Install

pip install pponnxcr

Usage

from pponnxcr import TextSystem
import cv2

ZHS = TextSystem('zhs')
ZHT = TextSystem('zht')
JA = TextSystem('ja')
EN = TextSystem('en')

img = cv2.imread('test.png')

ZHS.ocr_single_line(img)
ZHS.ocr_lines([img, ...])
ZHS.detect_and_ocr(img)

License

GNU AGPLv3

Which means that unless commercially licensed, any modification or use of this project in any way requires open source

Reference