-
Notifications
You must be signed in to change notification settings - Fork 7.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError when use det only / 单独执行检测时报错 ValueError #11761
Labels
Comments
dygraph 分支好像也是有类似的问题 paddleocr --image_dir ./doc/imgs/11.jpg --use_angle_cls False --use_gpu false --det True --rec False
|
@KumaTea 你可以提一个PR,修复这个问题。 |
该问题数月前已在 commit 42d2809 修复,只是没有同步到主分支,故关闭 |
Reopen as the fix still not merged in the latest version (v2.7.3)... |
你好感谢提出问题,我们会记录并进行修复 |
已经在PR #11287 中修复,且merged |
不仅仅是这一个判断的问题,det only里面bboxes整个是有问题的。真不知道为啥要写一个这么复杂的函数 |
已经把ppocr拆出来重写了 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
问题
使用 PaddleOCR 单独执行检测时,报错 ValueError
报错如下:
出错位置
paddleocr.py#L681
其中,
dt_boxes
数据示例临时解决方案
if not dt_boxes:
改为if not dt_boxes.all():
更正:dt_boxes 为 None 时会报错
if not dt_boxes:
改为if dt_boxes is None or not dt_boxes.all():
v2.6.0
PaddleOCR:v2.7.0.3
问题相关组件/Related components:paddleocr.PaddleOCR.ocr
ocr.ocr(image, det=True, rec=False, cls=False)
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
The text was updated successfully, but these errors were encountered: