mirror of
https://github.com/sml2h3/ddddocr.git
synced 2025-05-04 10:20:34 +08:00
9 lines
304 B
Python
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) |