PaddleOCR icon indicating copy to clipboard operation
PaddleOCR copied to clipboard

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

Open YasinZhao opened this issue 10 months ago • 1 comments

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

  • 系统环境/System Environment:Linux
  • 版本号/Version:Paddle:2.6.1 PaddleOCR:2.7.3 问题相关组件/Related components:paddleocr==2.7.3
  • 运行指令/Command Code:
  • 完整报错/Complete Error Message: image
image 如图1所示,在pypi发布的paddleocr==2.7.3版本,在仅使用det模型时,对于返回的数组在进行非空判断时,方法不对,会报错如图2所示。该问题,我看到已经有同学发布过PR(https://github.com/PaddlePaddle/PaddleOCR/pull/11440),但在pypi发布的whl文件中还是没有修正,希望下次发布时能够修正该问题,谢谢!

YasinZhao avatar Apr 17 '24 07:04 YasinZhao

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

Sunting78 avatar Apr 18 '24 02:04 Sunting78

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

YangWulve avatar May 27 '24 06:05 YangWulve

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

SWHL avatar Jun 06 '24 02:06 SWHL