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

fit architectures for cam (#7679)

上级 c3a33b3c
...@@ -106,8 +106,8 @@ class MaskRCNN(BaseArch): ...@@ -106,8 +106,8 @@ class MaskRCNN(BaseArch):
im_shape = self.inputs['im_shape'] im_shape = self.inputs['im_shape']
scale_factor = self.inputs['scale_factor'] scale_factor = self.inputs['scale_factor']
bbox, bbox_num = self.bbox_post_process(preds, (rois, rois_num), bbox, bbox_num, before_nms_indexes = self.bbox_post_process(
im_shape, scale_factor) preds, (rois, rois_num), im_shape, scale_factor)
mask_out = self.mask_head( mask_out = self.mask_head(
body_feats, bbox, bbox_num, self.inputs, feat_func=feat_func) body_feats, bbox, bbox_num, self.inputs, feat_func=feat_func)
......
...@@ -419,6 +419,7 @@ class PPYOLOERHead(nn.Layer): ...@@ -419,6 +419,7 @@ class PPYOLOERHead(nn.Layer):
axis=-1).reshape([-1, 1, 8]) axis=-1).reshape([-1, 1, 8])
pred_bboxes /= scale_factor pred_bboxes /= scale_factor
if self.export_onnx: if self.export_onnx:
return pred_bboxes, pred_scores return pred_bboxes, pred_scores, None
bbox_pred, bbox_num, _ = self.nms(pred_bboxes, pred_scores) bbox_pred, bbox_num, before_nms_indexes = self.nms(pred_bboxes,
return bbox_pred, bbox_num pred_scores)
return bbox_pred, bbox_num, before_nms_indexes
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册