SHI*_*HAN 6 python ocr image image-processing paddle-paddle
我正在尝试使用 paddlepaddle ocr 在图像处理后检测图像中的文本。但 paddle ocr 无法检测到文本。
from paddleocr import PaddleOCR,draw_ocr
ocr = PaddleOCR(use_angle_cls=True, lang='en')
img_path = '123.jpg'
result = ocr.ocr(img_path, cls=True)
r=[]
for line in result:
r.append(line[1][0])
print(r)
Run Code Online (Sandbox Code Playgroud)
[![图片链接在这里][1]][1]
小智 1
尝试设置 --det_db_score_mode='slow'
\npaddleocr --image_dir=./5NwdW.jpeg --det_db_score_mode=slow
\n我得到的结果如下。\n[2022/08/17 06:28:19] ppocr INFO: [[[38.0, 11.0], [1139.0, 19.0], [1139.0, 87.0], [38.0, 79.0]], ('P<INDSINGH<<SHRUTI<<<<<<<<<<<<<<\xe4\xba\xba\xe4\xba\xba\xe4\xba\xba\xe4\xba\xba\xe4\xba \xba\xe4\xba\xba\xe4\xba\xba<<<<', 0.8117786645889282)]\n[2022/08/17 06:28:19] ppocr 信息: [[[43.0, 66.0], [1142.0 , 85.0], [1141.0, 161.0], [42.0, 143.0]], ('Z4301759<2ind8507309F2706133<<<<<<<<<<<<<<2', 0.9215003848075867)]
\n很容易发现<字符被错误识别,但是数字和字母被正确识别。
\n