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
44.56k stars 7.85k forks source link

仅使用Det模型时,返回的numpy数组判断是否为空时报错 #11956

Closed YasinZhao closed 5 months ago

YasinZhao commented 7 months ago

请提供下述完整信息以便快速定位问题/Please provide the following information to quickly locate the problem

image

如图1所示,在pypi发布的paddleocr==2.7.3版本,在仅使用det模型时,对于返回的数组在进行非空判断时,方法不对,会报错如图2所示。该问题,我看到已经有同学发布过PR(https://github.com/PaddlePaddle/PaddleOCR/pull/11440),但在pypi发布的whl文件中还是没有修正,希望下次发布时能够修正该问题,谢谢

Sunting78 commented 7 months ago

您好,感谢提醒。我们会及时跟进

YangWulve commented 6 months ago

我也遇到了这个问题,因为paddleocr.py里688行的dt_boxes是numpy.ndarray,所以报错。 我将这里修改为if not dt_boxes.shape[0]: 后可以正常运行

SWHL commented 5 months ago

该问题的PR #11440 已经被merged了,后续发版会自动修复该问题。 issue先行关闭了