PaddlePaddle / PaddleOCR

Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, support 80+ languages recognition, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)
https://paddlepaddle.github.io/PaddleOCR/
Apache License 2.0
42.57k stars 7.67k forks source link

bug report #2086

Closed simplew2011 closed 3 years ago

simplew2011 commented 3 years ago

https://github.com/PaddlePaddle/PaddleOCR/blob/fa32b9b184528d446a3aea14a750a3912491dfd5/ppocr/utils/utility.py#L55

https://github.com/PaddlePaddle/PaddleOCR/blob/fa32b9b184528d446a3aea14a750a3912491dfd5/ppocr/utils/utility.py#L60

imghdr.what(file_path)取字符串的对应文件后缀,在‘D:\Plate_OCR\13\CCPD2019.tar\CCPD2019\ccpd_base_5k\01-89_92-300&547_485&612-496&612_301&613_297&552_492&551-0_0_28_32_30_31_33-140-41.jpg’中存在问题。可使用 suffix = os.path.splitext(img_file)[-1][1:] 代替

LDOUBLEV commented 3 years ago

fixed in https://github.com/PaddlePaddle/PaddleOCR/pull/2171