ddddocr验证码图片识别YYDS

纯数字

数字+字母

 

python代码:

import ddddocr

def main(imgpath):
    # imgpath='E:\yam_0.png'
    ocr = ddddocr.DdddOcr()
    with open(imgpath,'rb') as f:
        image_bytes = f.read()
    res = ocr.classification(image_bytes)
    print(res)
    return res

 

posted @ 2024-05-30 09:41  dabeen  阅读(31)  评论(0编辑  收藏  举报