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

fix postprocess (#7684)

上级 76ff51c6
......@@ -74,8 +74,8 @@ class BlazeFace(BaseArch):
self.inputs['gt_class'])
else:
preds, anchors = self.blaze_head(neck_feats, self.inputs['image'])
bbox, bbox_num = self.post_process(preds, anchors,
self.inputs['im_shape'],
bbox, bbox_num, before_nms_indexes = self.post_process(
preds, anchors, self.inputs['im_shape'],
self.inputs['scale_factor'])
return bbox, bbox_num
......
......@@ -75,8 +75,8 @@ class SSD(BaseArch):
self.inputs['gt_class'])
else:
preds, anchors = self.ssd_head(body_feats, self.inputs['image'])
bbox, bbox_num = self.post_process(preds, anchors,
self.inputs['im_shape'],
bbox, bbox_num, before_nms_indexes = self.post_process(
preds, anchors, self.inputs['im_shape'],
self.inputs['scale_factor'])
return bbox, bbox_num
......
......@@ -391,5 +391,6 @@ class FCOSRHead(nn.Layer):
],
axis=-1).reshape([-1, 1, 8])
pred_rboxes /= scale_factor
bbox_pred, bbox_num, _ = self.nms(pred_rboxes, pred_scores)
return bbox_pred, bbox_num
bbox_pred, bbox_num, before_nms_indexes = self.nms(pred_rboxes,
pred_scores)
return bbox_pred, bbox_num, before_nms_indexes
......@@ -258,7 +258,7 @@ class PPYOLOERHead(nn.Layer):
pad_gt_mask = gt_meta['pad_gt_mask']
# label assignment
if gt_meta['epoch_id'] < self.static_assigner_epoch:
assigned_labels, assigned_bboxes, assigned_scores, _ = \
assigned_labels, assigned_bboxes, assigned_scores = \
self.static_assigner(
anchor_points,
stride_tensor,
......@@ -271,7 +271,7 @@ class PPYOLOERHead(nn.Layer):
pred_bboxes.detach()
)
else:
assigned_labels, assigned_bboxes, assigned_scores, _ = \
assigned_labels, assigned_bboxes, assigned_scores = \
self.assigner(
pred_scores.detach(),
pred_bboxes.detach(),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册