From 7bd57165584953e3b9ab336fd5510c7286649f32 Mon Sep 17 00:00:00 2001 From: Guanghua Yu <742925032@qq.com> Date: Wed, 14 Apr 2021 11:27:49 +0800 Subject: [PATCH] fix bbox_loss in cascade rcnn (#2615) --- ppdet/modeling/heads/cascade_head.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ppdet/modeling/heads/cascade_head.py b/ppdet/modeling/heads/cascade_head.py index 0ee23c040..aed59661b 100644 --- a/ppdet/modeling/heads/cascade_head.py +++ b/ppdet/modeling/heads/cascade_head.py @@ -137,7 +137,7 @@ class CascadeXConvNormHead(nn.Layer): @register class CascadeHead(BBoxHead): __shared__ = ['num_classes', 'num_cascade_stages'] - __inject__ = ['bbox_assigner'] + __inject__ = ['bbox_assigner', 'bbox_loss'] """ Cascade RCNN bbox head @@ -161,7 +161,8 @@ class CascadeHead(BBoxHead): num_classes=80, bbox_weight=[[10., 10., 5., 5.], [20.0, 20.0, 10.0, 10.0], [30.0, 30.0, 15.0, 15.0]], - num_cascade_stages=3): + num_cascade_stages=3, + bbox_loss=None): nn.Layer.__init__(self, ) self.head = head self.roi_extractor = roi_extractor @@ -172,6 +173,7 @@ class CascadeHead(BBoxHead): self.num_classes = num_classes self.bbox_weight = bbox_weight self.num_cascade_stages = num_cascade_stages + self.bbox_loss = bbox_loss self.bbox_score_list = [] self.bbox_delta_list = [] -- GitLab