提交 6c9a86fc 编写于 作者: A AIFollowers 提交者: jerrywgz

fix no random bug (#2531)

* test=develop fix no random bug
上级 d63b2bd3
...@@ -26,16 +26,15 @@ __all__ = ['BBoxAssigner', 'MaskAssigner', 'CascadeBBoxAssigner'] ...@@ -26,16 +26,15 @@ __all__ = ['BBoxAssigner', 'MaskAssigner', 'CascadeBBoxAssigner']
@register @register
class CascadeBBoxAssigner(object): class CascadeBBoxAssigner(object):
def __init__( def __init__(self,
self, batch_size_per_im=512,
batch_size_per_im=512, fg_fraction=.25,
fg_fraction=.25, fg_thresh=[0.5, 0.6, 0.7],
fg_thresh=[0.5, 0.6, 0.7], bg_thresh_hi=[0.5, 0.6, 0.7],
bg_thresh_hi=[0.5, 0.6, 0.7], bg_thresh_lo=[0., 0., 0.],
bg_thresh_lo=[0., 0., 0.], bbox_reg_weights=[10, 20, 30],
bbox_reg_weights=[10, 20, 30], num_classes=81,
num_classes=81, shuffle_before_sample=True):
shuffle_before_sample=True, ):
super(CascadeBBoxAssigner, self).__init__() super(CascadeBBoxAssigner, self).__init__()
self.batch_size_per_im = batch_size_per_im self.batch_size_per_im = batch_size_per_im
self.fg_fraction = fg_fraction self.fg_fraction = fg_fraction
...@@ -65,8 +64,8 @@ class CascadeBBoxAssigner(object): ...@@ -65,8 +64,8 @@ class CascadeBBoxAssigner(object):
bg_thresh_hi=self.bg_thresh_hi[curr_stage], bg_thresh_hi=self.bg_thresh_hi[curr_stage],
bg_thresh_lo=self.bg_thresh_lo[curr_stage], bg_thresh_lo=self.bg_thresh_lo[curr_stage],
bbox_reg_weights=curr_bbox_reg_w, bbox_reg_weights=curr_bbox_reg_w,
use_random=False, use_random=self.use_random,
class_nums=2, class_nums=2,
is_cls_agnostic=True, is_cls_agnostic=True,
is_cascade_rcnn=True if curr_stage > 0 else False, ) is_cascade_rcnn=True if curr_stage > 0 else False)
return outs return outs
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册