diff --git a/ppdet/modeling/architectures/blazeface.py b/ppdet/modeling/architectures/blazeface.py index af6aa269d1680a0990bcfa78875ef07ac62c5af0..2f5d0d238ebd5d4b92916e79ff192932f4baff33 100644 --- a/ppdet/modeling/architectures/blazeface.py +++ b/ppdet/modeling/architectures/blazeface.py @@ -74,9 +74,9 @@ 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'], - self.inputs['scale_factor']) + bbox, bbox_num, before_nms_indexes = self.post_process( + preds, anchors, self.inputs['im_shape'], + self.inputs['scale_factor']) return bbox, bbox_num def get_loss(self, ): diff --git a/ppdet/modeling/architectures/ssd.py b/ppdet/modeling/architectures/ssd.py index 34bf24108dad947a7e982545b6956efb0472840a..2d2bf1dd2ce4b4b273ff420239f2f388ae05e015 100644 --- a/ppdet/modeling/architectures/ssd.py +++ b/ppdet/modeling/architectures/ssd.py @@ -75,9 +75,9 @@ 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'], - self.inputs['scale_factor']) + bbox, bbox_num, before_nms_indexes = self.post_process( + preds, anchors, self.inputs['im_shape'], + self.inputs['scale_factor']) return bbox, bbox_num def get_loss(self, ): diff --git a/ppdet/modeling/heads/fcosr_head.py b/ppdet/modeling/heads/fcosr_head.py index 97cd949d70bf67f9344b10d680dc9fd649960912..df98883dffdb4d10697fea0d28a1aa890186b835 100644 --- a/ppdet/modeling/heads/fcosr_head.py +++ b/ppdet/modeling/heads/fcosr_head.py @@ -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 diff --git a/ppdet/modeling/heads/ppyoloe_r_head.py b/ppdet/modeling/heads/ppyoloe_r_head.py index 7b5eabcbe31339a4920797c8fde27652c7a21631..fba401d7e7a7ff725938760be09b478d924dc705 100644 --- a/ppdet/modeling/heads/ppyoloe_r_head.py +++ b/ppdet/modeling/heads/ppyoloe_r_head.py @@ -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(),