5
0
mirror of https://github.com/sml2h3/ddddocr.git synced 2025-05-04 23:51:32 +08:00
ddddocr/test.py
2022-02-26 15:41:57 +08:00

9 lines
304 B
Python

import ddddocr
ocr = ddddocr.DdddOcr(det=False, ocr=False, import_onnx_path="myproject_0.984375_139_13000_2022-02-26-15-34-13.onnx", charsets_path="charsets.json")
with open('888e28774f815b01e871d474e5c84ff2.jpg', 'rb') as f:
image_bytes = f.read()
res = ocr.classification(image_bytes)
print(res)