未验证 提交 a1ed98ad 编写于 作者: C cnn 提交者: GitHub

[dev] fix warning when result is empty (#3488)

* fix warning when result is empty

* fix warning when result is empty
上级 35e66572
......@@ -163,7 +163,7 @@ class Detector(object):
results = []
if reduce(lambda x, y: x * y, np_boxes.shape) < 6:
print('[WARNNING] No object detected.')
results = {'boxes': np.array([]), 'boxes_num': [0]}
results = {'boxes': np.array([[]]), 'boxes_num': [0]}
else:
results = self.postprocess(
np_boxes, np_masks, inputs, np_boxes_num, threshold=threshold)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册