未验证 提交 53638d3d 编写于 作者: L littletomatodonkey 提交者: GitHub

fix diou nms (#599)

上级 1d923973
......@@ -722,7 +722,7 @@ class MultiClassDiouNMS(object):
cls_boxes = np.vstack(cls_boxes[start_idx:])
cls_ids = np.vstack(cls_ids[start_idx:])
pred_result = np.hstack([cls_ids, cls_boxes])
pred_result = np.hstack([cls_ids, cls_boxes]).astype(np.float32)
# Limit to max_per_image detections **over all classes**
image_scores = cls_boxes[:, 0]
......@@ -743,8 +743,8 @@ class MultiClassDiouNMS(object):
fluid.default_main_program(),
name='diou_nms_pred_result',
dtype='float32',
shape=[6],
lod_level=1)
shape=[-1, 6],
lod_level=0)
fluid.layers.py_func(
func=_diou_nms, x=[bboxes, scores], out=pred_result)
return pred_result
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册