From 274d953c1bb52466e4cd46a7d42ecd1e2db51660 Mon Sep 17 00:00:00 2001 From: wangguanzhong Date: Fri, 30 Aug 2019 14:24:08 +0800 Subject: [PATCH] fix rpn_only in cascade mask fpn (#3231) * fix rpn_only in cascade mask fpn * fix rpn_only in cascade rcnn --- .../ppdet/modeling/architectures/cascade_mask_rcnn.py | 4 ++-- .../ppdet/modeling/architectures/cascade_rcnn.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/PaddleCV/PaddleDetection/ppdet/modeling/architectures/cascade_mask_rcnn.py b/PaddleCV/PaddleDetection/ppdet/modeling/architectures/cascade_mask_rcnn.py index ede3ffdf..2e480b78 100644 --- a/PaddleCV/PaddleDetection/ppdet/modeling/architectures/cascade_mask_rcnn.py +++ b/PaddleCV/PaddleDetection/ppdet/modeling/architectures/cascade_mask_rcnn.py @@ -114,8 +114,8 @@ class CascadeMaskRCNN(object): if self.rpn_only: im_scale = fluid.layers.slice( im_info, [1], starts=[2], ends=[3]) - im_scale = fluid.layers.sequence_expand(im_scale, rois) - rois = rois / im_scale + im_scale = fluid.layers.sequence_expand(im_scale, rpn_rois) + rois = rpn_rois / im_scale return {'proposal': rois} proposal_list = [] diff --git a/PaddleCV/PaddleDetection/ppdet/modeling/architectures/cascade_rcnn.py b/PaddleCV/PaddleDetection/ppdet/modeling/architectures/cascade_rcnn.py index 133281e4..6f4c4164 100644 --- a/PaddleCV/PaddleDetection/ppdet/modeling/architectures/cascade_rcnn.py +++ b/PaddleCV/PaddleDetection/ppdet/modeling/architectures/cascade_rcnn.py @@ -106,8 +106,8 @@ class CascadeRCNN(object): if self.rpn_only: im_scale = fluid.layers.slice( im_info, [1], starts=[2], ends=[3]) - im_scale = fluid.layers.sequence_expand(im_scale, rois) - rois = rois / im_scale + im_scale = fluid.layers.sequence_expand(im_scale, rpn_rois) + rois = rpn_rois / im_scale return {'proposal': rois} proposal_list = [] -- GitLab