首页 Paddle框架 帖子详情
使用nms函数报错
收藏
快速回复
Paddle框架 问答学习资料炼丹技巧深度学习 291 0
使用nms函数报错
收藏
快速回复
Paddle框架 问答学习资料炼丹技巧深度学习 291 0

代码如图所示

报错信息如下

File "E:\学习\MobileNet-SSD\ssd-paddle\utils\utils_bbox.py", line 105, in decode_box
keep = nms(boxes=boxes_to_process, scores=confs_to_process, iou_threshold=nms_iou)
File "E:\environment\ananconda\envs\paddle\lib\site-packages\paddle\vision\ops.py", line 2172, in nms
sorted_keep_boxes_indices = _nms(
File "E:\environment\ananconda\envs\paddle\lib\site-packages\paddle\vision\ops.py", line 2150, in _nms
return _C_ops.nms(boxes, iou_threshold)
ValueError: (InvalidArgument) The Input Boxes must be 2-dimention whose shape must be [N, 4] N is the number of boxes in last dimension in format [x1, x2, y1, y2].
[Hint: Expected boxes_dim.size() == 2, but received boxes_dim.size():1 != 2:2.] (at ..\paddle\phi\infermeta\unary.cc:2037)

debug中显示boxes_to_process 的shape为[1,4]的时候通过不了nms其他的都可以通过。求大佬们帮忙看看

0
收藏
回复
需求/bug反馈?一键提issue告诉我们
发现bug?如果您知道修复办法,欢迎提pr直接参与建设飞桨~
在@后输入用户全名并按空格结束,可艾特全站任一用户