import ddddocr ocr = ddddocr.DdddOcr() with open('img/验证码3.png', 'rb') as f: img_bytes = f.read() result = ocr.classification(img_bytes) print(result)
运行结果: