未验证 提交 8474ac99 编写于 作者: S shangliang Xu 提交者: GitHub

[deploy] fix no object in Detector.predict (#4325)

上级 69d21d88
...@@ -170,7 +170,7 @@ class Detector(object): ...@@ -170,7 +170,7 @@ class Detector(object):
results = [] results = []
if reduce(lambda x, y: x * y, np_boxes.shape) < 6: if reduce(lambda x, y: x * y, np_boxes.shape) < 6:
print('[WARNNING] No object detected.') print('[WARNNING] No object detected.')
results = {'boxes': np.array([[]]), 'boxes_num': [0]} results = {'boxes': np.zeros([0, 6]), 'boxes_num': [0]}
else: else:
results = self.postprocess( results = self.postprocess(
np_boxes, np_masks, inputs, np_boxes_num, threshold=threshold) 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.
先完成此消息的编辑!
想要评论请 注册