带带弟弟OCR
Project description
带带弟弟OCR通用验证码识别SDK免费开源版
交流群(找对象,在苏州,dd群主)
环境要求
python >= 3.8
Windows/Linux..
调用方法
pip install ddddocr
import ddddocr
ocr = ddddocr.DdddOcr()
with open('test.png', 'rb') as f:
img_bytes = f.read()
res = ocr.classification(img_bytes=img_bytes)
print(res)
或者传入图片 base64 编码值(不包含图片头)
import ddddocr
ocr = ddddocr.DdddOcr()
img_base64 = 'img_base64' # 示例
res = ocr.classification(img_base64=img_base64)
print(res)
参数说明
DdddOcr 接受两个参数
| 参数名 | 默认值 | 说明 |
|---|---|---|
| use_gpu | False | Bool 是否使用gpu进行推理,如果该值为False则device_id不生效 |
| device_id | 0 | int cuda设备号,目前仅支持单张显卡 |
classification
| 参数名 | 默认值 | 说明 |
|---|---|---|
| img_bytes | None | bytes 图片的bytes格式 |
| img_base64 | None | 图片的 base64 编码值(不包含图片头) |
说明,当
img_bytes和img_base64都存在时,优先使用img_bytes
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
ddddocr-1.2.0.tar.gz
(50.3 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
ddddocr-1.2.0-py3-none-any.whl
(50.3 MB
view details)
File details
Details for the file ddddocr-1.2.0.tar.gz.
File metadata
- Download URL: ddddocr-1.2.0.tar.gz
- Upload date:
- Size: 50.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc14faf50a733f78f3d88dfa77965758814deaff6709194a0042222a2a936720
|
|
| MD5 |
3ffa540875352f8f4bcfb5670e48c1f1
|
|
| BLAKE2b-256 |
7cab4cdb7cc0465598a8308dd31b4f37d8429caea8a1fb0a5f52f83a53c43c31
|
File details
Details for the file ddddocr-1.2.0-py3-none-any.whl.
File metadata
- Download URL: ddddocr-1.2.0-py3-none-any.whl
- Upload date:
- Size: 50.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fee918aa94fa666bab554702100656dfd815b8a8c200d99e5f5122b3802e7390
|
|
| MD5 |
18dde10faa4b06538ca599b2a802788a
|
|
| BLAKE2b-256 |
d2a2a704123f6a8cdc9897b90e55153312ef367fff5fe456be48b8d858718383
|