5
0
mirror of https://github.com/sml2h3/ddddocr.git synced 2025-05-19 02:09:34 +08:00
带带弟弟 通用验证码识别OCR pypi版
Go to file
Sml2h3 2b2f4b2bfb
Merge pull request #6 from linupychiang/base64
[feat] 增加通过图片base64编码值识别的方式
2021-07-29 18:41:47 +08:00
ddddocr [feat] 增加通过图片base64编码值识别的方式 2021-07-28 13:09:18 +08:00
MANIFEST.in Initial commit 2021-07-14 17:00:16 +08:00
README.md Initial commit 2021-07-14 17:00:16 +08:00
setup.py Initial commit 2021-07-14 17:00:16 +08:00
test.py Initial commit 2021-07-14 17:00:16 +08:00

header.png

带带弟弟OCR通用验证码识别SDK免费开源版

环境要求

python >= 3.8

Windows/Linux/Macox..

调用方法

pip install ddddocr

import ddddocr

ocr = ddddocr.DdddOcr()

with open('test.png', 'rb') as f:

    img_bytes = f.read()

res = ocr.classification(img_bytes)

print(res)

参数说明

DdddOcr 接受两个参数

参数名 默认值 说明
use_gpu False Bool 是否使用gpu进行推理如果该值为False则device_id不生效
device_id 0 int cuda设备号目前仅支持单张显卡

classification

参数名 默认值 说明
img 0 bytes 图片的bytes格式