未验证 提交 c0d33f13 编写于 作者: J jerrywgz 提交者: GitHub

Merge pull request #15817 from jerrywgz/fix_nm_unittest_py36

fix nms unittest in py36
......@@ -173,13 +173,16 @@ def lod_multiclass_nms(boxes, scores, background, score_threshold,
normalized,
shared=False)
if nmsed_num == 0:
#lod.append(1)
continue
lod.append(nmsed_num)
tmp_det_out = []
for c, indices in nmsed_outs.items():
for idx in indices:
xmin, ymin, xmax, ymax = box[idx, c, :]
det_outs.append([c, score[idx][c], xmin, ymin, xmax, ymax])
tmp_det_out.append([c, score[idx][c], xmin, ymin, xmax, ymax])
sorted_det_out = sorted(
tmp_det_out, key=lambda tup: tup[0], reverse=False)
det_outs.extend(sorted_det_out)
if len(lod) == 0:
lod.append(1)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册