未验证 提交 b8581b74 编写于 作者: W wangguanzhong 提交者: GitHub

[cherry-pick] fix empty output in voc (#3431)

上级 a6983cc5
......@@ -235,9 +235,10 @@ class VOCMetric(Metric):
self.detection_map.reset()
def update(self, inputs, outputs):
bboxes = outputs['bbox'][:, 2:].numpy()
scores = outputs['bbox'][:, 1].numpy()
labels = outputs['bbox'][:, 0].numpy()
bbox_np = outputs['bbox'].numpy()
bboxes = bbox_np[:, 2:]
scores = bbox_np[:, 1]
labels = bbox_np[:, 0]
bbox_lengths = outputs['bbox_num'].numpy()
if bboxes.shape == (1, 1) or bboxes is None:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册