Commit 57d34592 authored by Jiangmiao Pang's avatar Jiangmiao Pang Committed by Kai Chen
Browse files

Add loss evaluator (#678)

* Fix license in setup.py

* Add code for loss evaluator

* Configs support loss evaluator

* Fix a little bug

* Fix flake8

* return revised bbox to reg

* return revised bbox to reg

* revision according to comments

* fix flake8
parent a99dbae7
...@@ -26,7 +26,9 @@ model = dict( ...@@ -26,7 +26,9 @@ model = dict(
anchor_strides=[4, 8, 16, 32, 64], anchor_strides=[4, 8, 16, 32, 64],
target_means=[.0, .0, .0, .0], target_means=[.0, .0, .0, .0],
target_stds=[1.0, 1.0, 1.0, 1.0], target_stds=[1.0, 1.0, 1.0, 1.0],
use_sigmoid_cls=True), loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0)),
bbox_roi_extractor=dict( bbox_roi_extractor=dict(
type='SingleRoIExtractor', type='SingleRoIExtractor',
roi_layer=dict(type='RoIAlign', out_size=7, sample_num=2), roi_layer=dict(type='RoIAlign', out_size=7, sample_num=2),
...@@ -42,7 +44,15 @@ model = dict( ...@@ -42,7 +44,15 @@ model = dict(
num_classes=81, num_classes=81,
target_means=[0., 0., 0., 0.], target_means=[0., 0., 0., 0.],
target_stds=[0.1, 0.1, 0.2, 0.2], target_stds=[0.1, 0.1, 0.2, 0.2],
reg_class_agnostic=True), reg_class_agnostic=True,
loss_cls=dict(
type='CrossEntropyLoss',
use_sigmoid=False,
loss_weight=1.0),
loss_bbox=dict(
type='SmoothL1Loss',
beta=1.0,
loss_weight=1.0)),
dict( dict(
type='SharedFCBBoxHead', type='SharedFCBBoxHead',
num_fcs=2, num_fcs=2,
...@@ -52,7 +62,15 @@ model = dict( ...@@ -52,7 +62,15 @@ model = dict(
num_classes=81, num_classes=81,
target_means=[0., 0., 0., 0.], target_means=[0., 0., 0., 0.],
target_stds=[0.05, 0.05, 0.1, 0.1], target_stds=[0.05, 0.05, 0.1, 0.1],
reg_class_agnostic=True), reg_class_agnostic=True,
loss_cls=dict(
type='CrossEntropyLoss',
use_sigmoid=False,
loss_weight=1.0),
loss_bbox=dict(
type='SmoothL1Loss',
beta=1.0,
loss_weight=1.0)),
dict( dict(
type='SharedFCBBoxHead', type='SharedFCBBoxHead',
num_fcs=2, num_fcs=2,
...@@ -62,7 +80,15 @@ model = dict( ...@@ -62,7 +80,15 @@ model = dict(
num_classes=81, num_classes=81,
target_means=[0., 0., 0., 0.], target_means=[0., 0., 0., 0.],
target_stds=[0.033, 0.033, 0.067, 0.067], target_stds=[0.033, 0.033, 0.067, 0.067],
reg_class_agnostic=True) reg_class_agnostic=True,
loss_cls=dict(
type='CrossEntropyLoss',
use_sigmoid=False,
loss_weight=1.0),
loss_bbox=dict(
type='SmoothL1Loss',
beta=1.0,
loss_weight=1.0))
], ],
mask_roi_extractor=dict( mask_roi_extractor=dict(
type='SingleRoIExtractor', type='SingleRoIExtractor',
...@@ -74,7 +100,9 @@ model = dict( ...@@ -74,7 +100,9 @@ model = dict(
num_convs=4, num_convs=4,
in_channels=256, in_channels=256,
conv_out_channels=256, conv_out_channels=256,
num_classes=81), num_classes=81,
loss_mask=dict(
type='CrossEntropyLoss', use_mask=True, loss_weight=1.0)),
semantic_roi_extractor=dict( semantic_roi_extractor=dict(
type='SingleRoIExtractor', type='SingleRoIExtractor',
roi_layer=dict(type='RoIAlign', out_size=14, sample_num=2), roi_layer=dict(type='RoIAlign', out_size=14, sample_num=2),
...@@ -107,7 +135,6 @@ train_cfg = dict( ...@@ -107,7 +135,6 @@ train_cfg = dict(
add_gt_as_proposals=False), add_gt_as_proposals=False),
allowed_border=0, allowed_border=0,
pos_weight=-1, pos_weight=-1,
smoothl1_beta=1 / 9.0,
debug=False), debug=False),
rpn_proposal=dict( rpn_proposal=dict(
nms_across_levels=False, nms_across_levels=False,
......
...@@ -26,7 +26,9 @@ model = dict( ...@@ -26,7 +26,9 @@ model = dict(
anchor_strides=[4, 8, 16, 32, 64], anchor_strides=[4, 8, 16, 32, 64],
target_means=[.0, .0, .0, .0], target_means=[.0, .0, .0, .0],
target_stds=[1.0, 1.0, 1.0, 1.0], target_stds=[1.0, 1.0, 1.0, 1.0],
use_sigmoid_cls=True), loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0)),
bbox_roi_extractor=dict( bbox_roi_extractor=dict(
type='SingleRoIExtractor', type='SingleRoIExtractor',
roi_layer=dict(type='RoIAlign', out_size=7, sample_num=2), roi_layer=dict(type='RoIAlign', out_size=7, sample_num=2),
...@@ -42,7 +44,15 @@ model = dict( ...@@ -42,7 +44,15 @@ model = dict(
num_classes=81, num_classes=81,
target_means=[0., 0., 0., 0.], target_means=[0., 0., 0., 0.],
target_stds=[0.1, 0.1, 0.2, 0.2], target_stds=[0.1, 0.1, 0.2, 0.2],
reg_class_agnostic=True), reg_class_agnostic=True,
loss_cls=dict(
type='CrossEntropyLoss',
use_sigmoid=False,
loss_weight=1.0),
loss_bbox=dict(
type='SmoothL1Loss',
beta=1.0,
loss_weight=1.0)),
dict( dict(
type='SharedFCBBoxHead', type='SharedFCBBoxHead',
num_fcs=2, num_fcs=2,
...@@ -52,7 +62,15 @@ model = dict( ...@@ -52,7 +62,15 @@ model = dict(
num_classes=81, num_classes=81,
target_means=[0., 0., 0., 0.], target_means=[0., 0., 0., 0.],
target_stds=[0.05, 0.05, 0.1, 0.1], target_stds=[0.05, 0.05, 0.1, 0.1],
reg_class_agnostic=True), reg_class_agnostic=True,
loss_cls=dict(
type='CrossEntropyLoss',
use_sigmoid=False,
loss_weight=1.0),
loss_bbox=dict(
type='SmoothL1Loss',
beta=1.0,
loss_weight=1.0)),
dict( dict(
type='SharedFCBBoxHead', type='SharedFCBBoxHead',
num_fcs=2, num_fcs=2,
...@@ -62,7 +80,15 @@ model = dict( ...@@ -62,7 +80,15 @@ model = dict(
num_classes=81, num_classes=81,
target_means=[0., 0., 0., 0.], target_means=[0., 0., 0., 0.],
target_stds=[0.033, 0.033, 0.067, 0.067], target_stds=[0.033, 0.033, 0.067, 0.067],
reg_class_agnostic=True) reg_class_agnostic=True,
loss_cls=dict(
type='CrossEntropyLoss',
use_sigmoid=False,
loss_weight=1.0),
loss_bbox=dict(
type='SmoothL1Loss',
beta=1.0,
loss_weight=1.0))
], ],
mask_roi_extractor=dict( mask_roi_extractor=dict(
type='SingleRoIExtractor', type='SingleRoIExtractor',
...@@ -74,7 +100,9 @@ model = dict( ...@@ -74,7 +100,9 @@ model = dict(
num_convs=4, num_convs=4,
in_channels=256, in_channels=256,
conv_out_channels=256, conv_out_channels=256,
num_classes=81)) num_classes=81,
loss_mask=dict(
type='CrossEntropyLoss', use_mask=True, loss_weight=1.0)))
# model training and testing settings # model training and testing settings
train_cfg = dict( train_cfg = dict(
rpn=dict( rpn=dict(
...@@ -92,7 +120,6 @@ train_cfg = dict( ...@@ -92,7 +120,6 @@ train_cfg = dict(
add_gt_as_proposals=False), add_gt_as_proposals=False),
allowed_border=0, allowed_border=0,
pos_weight=-1, pos_weight=-1,
smoothl1_beta=1 / 9.0,
debug=False), debug=False),
rpn_proposal=dict( rpn_proposal=dict(
nms_across_levels=False, nms_across_levels=False,
......
...@@ -28,7 +28,9 @@ model = dict( ...@@ -28,7 +28,9 @@ model = dict(
anchor_strides=[4, 8, 16, 32, 64], anchor_strides=[4, 8, 16, 32, 64],
target_means=[.0, .0, .0, .0], target_means=[.0, .0, .0, .0],
target_stds=[1.0, 1.0, 1.0, 1.0], target_stds=[1.0, 1.0, 1.0, 1.0],
use_sigmoid_cls=True), loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0)),
bbox_roi_extractor=dict( bbox_roi_extractor=dict(
type='SingleRoIExtractor', type='SingleRoIExtractor',
roi_layer=dict(type='RoIAlign', out_size=7, sample_num=2), roi_layer=dict(type='RoIAlign', out_size=7, sample_num=2),
...@@ -44,7 +46,15 @@ model = dict( ...@@ -44,7 +46,15 @@ model = dict(
num_classes=81, num_classes=81,
target_means=[0., 0., 0., 0.], target_means=[0., 0., 0., 0.],
target_stds=[0.1, 0.1, 0.2, 0.2], target_stds=[0.1, 0.1, 0.2, 0.2],
reg_class_agnostic=True), reg_class_agnostic=True,
loss_cls=dict(
type='CrossEntropyLoss',
use_sigmoid=False,
loss_weight=1.0),
loss_bbox=dict(
type='SmoothL1Loss',
beta=1.0,
loss_weight=1.0)),
dict( dict(
type='SharedFCBBoxHead', type='SharedFCBBoxHead',
num_fcs=2, num_fcs=2,
...@@ -54,7 +64,15 @@ model = dict( ...@@ -54,7 +64,15 @@ model = dict(
num_classes=81, num_classes=81,
target_means=[0., 0., 0., 0.], target_means=[0., 0., 0., 0.],
target_stds=[0.05, 0.05, 0.1, 0.1], target_stds=[0.05, 0.05, 0.1, 0.1],
reg_class_agnostic=True), reg_class_agnostic=True,
loss_cls=dict(
type='CrossEntropyLoss',
use_sigmoid=False,
loss_weight=1.0),
loss_bbox=dict(
type='SmoothL1Loss',
beta=1.0,
loss_weight=1.0)),
dict( dict(
type='SharedFCBBoxHead', type='SharedFCBBoxHead',
num_fcs=2, num_fcs=2,
...@@ -64,7 +82,15 @@ model = dict( ...@@ -64,7 +82,15 @@ model = dict(
num_classes=81, num_classes=81,
target_means=[0., 0., 0., 0.], target_means=[0., 0., 0., 0.],
target_stds=[0.033, 0.033, 0.067, 0.067], target_stds=[0.033, 0.033, 0.067, 0.067],
reg_class_agnostic=True) reg_class_agnostic=True,
loss_cls=dict(
type='CrossEntropyLoss',
use_sigmoid=False,
loss_weight=1.0),
loss_bbox=dict(
type='SmoothL1Loss',
beta=1.0,
loss_weight=1.0))
], ],
mask_roi_extractor=dict( mask_roi_extractor=dict(
type='SingleRoIExtractor', type='SingleRoIExtractor',
...@@ -76,7 +102,9 @@ model = dict( ...@@ -76,7 +102,9 @@ model = dict(
num_convs=4, num_convs=4,
in_channels=256, in_channels=256,
conv_out_channels=256, conv_out_channels=256,
num_classes=81), num_classes=81,
loss_mask=dict(
type='CrossEntropyLoss', use_mask=True, loss_weight=1.0)),
semantic_roi_extractor=dict( semantic_roi_extractor=dict(
type='SingleRoIExtractor', type='SingleRoIExtractor',
roi_layer=dict(type='RoIAlign', out_size=14, sample_num=2), roi_layer=dict(type='RoIAlign', out_size=14, sample_num=2),
...@@ -109,7 +137,6 @@ train_cfg = dict( ...@@ -109,7 +137,6 @@ train_cfg = dict(
add_gt_as_proposals=False), add_gt_as_proposals=False),
allowed_border=0, allowed_border=0,
pos_weight=-1, pos_weight=-1,
smoothl1_beta=1 / 9.0,
debug=False), debug=False),
rpn_proposal=dict( rpn_proposal=dict(
nms_across_levels=False, nms_across_levels=False,
......
...@@ -28,7 +28,9 @@ model = dict( ...@@ -28,7 +28,9 @@ model = dict(
anchor_strides=[4, 8, 16, 32, 64], anchor_strides=[4, 8, 16, 32, 64],
target_means=[.0, .0, .0, .0], target_means=[.0, .0, .0, .0],
target_stds=[1.0, 1.0, 1.0, 1.0], target_stds=[1.0, 1.0, 1.0, 1.0],
use_sigmoid_cls=True), loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0)),
bbox_roi_extractor=dict( bbox_roi_extractor=dict(
type='SingleRoIExtractor', type='SingleRoIExtractor',
roi_layer=dict(type='RoIAlign', out_size=7, sample_num=2), roi_layer=dict(type='RoIAlign', out_size=7, sample_num=2),
...@@ -44,7 +46,15 @@ model = dict( ...@@ -44,7 +46,15 @@ model = dict(
num_classes=81, num_classes=81,
target_means=[0., 0., 0., 0.], target_means=[0., 0., 0., 0.],
target_stds=[0.1, 0.1, 0.2, 0.2], target_stds=[0.1, 0.1, 0.2, 0.2],
reg_class_agnostic=True), reg_class_agnostic=True,
loss_cls=dict(
type='CrossEntropyLoss',
use_sigmoid=False,
loss_weight=1.0),
loss_bbox=dict(
type='SmoothL1Loss',
beta=1.0,
loss_weight=1.0)),
dict( dict(
type='SharedFCBBoxHead', type='SharedFCBBoxHead',
num_fcs=2, num_fcs=2,
...@@ -54,7 +64,15 @@ model = dict( ...@@ -54,7 +64,15 @@ model = dict(
num_classes=81, num_classes=81,
target_means=[0., 0., 0., 0.], target_means=[0., 0., 0., 0.],
target_stds=[0.05, 0.05, 0.1, 0.1], target_stds=[0.05, 0.05, 0.1, 0.1],
reg_class_agnostic=True), reg_class_agnostic=True,
loss_cls=dict(
type='CrossEntropyLoss',
use_sigmoid=False,
loss_weight=1.0),
loss_bbox=dict(
type='SmoothL1Loss',
beta=1.0,
loss_weight=1.0)),
dict( dict(
type='SharedFCBBoxHead', type='SharedFCBBoxHead',
num_fcs=2, num_fcs=2,
...@@ -64,7 +82,15 @@ model = dict( ...@@ -64,7 +82,15 @@ model = dict(
num_classes=81, num_classes=81,
target_means=[0., 0., 0., 0.], target_means=[0., 0., 0., 0.],
target_stds=[0.033, 0.033, 0.067, 0.067], target_stds=[0.033, 0.033, 0.067, 0.067],
reg_class_agnostic=True) reg_class_agnostic=True,
loss_cls=dict(
type='CrossEntropyLoss',
use_sigmoid=False,
loss_weight=1.0),
loss_bbox=dict(
type='SmoothL1Loss',
beta=1.0,
loss_weight=1.0))
], ],
mask_roi_extractor=dict( mask_roi_extractor=dict(
type='SingleRoIExtractor', type='SingleRoIExtractor',
...@@ -76,7 +102,9 @@ model = dict( ...@@ -76,7 +102,9 @@ model = dict(
num_convs=4, num_convs=4,
in_channels=256, in_channels=256,
conv_out_channels=256, conv_out_channels=256,
num_classes=81), num_classes=81,
loss_mask=dict(
type='CrossEntropyLoss', use_mask=True, loss_weight=1.0)),
semantic_roi_extractor=dict( semantic_roi_extractor=dict(
type='SingleRoIExtractor', type='SingleRoIExtractor',
roi_layer=dict(type='RoIAlign', out_size=14, sample_num=2), roi_layer=dict(type='RoIAlign', out_size=14, sample_num=2),
...@@ -109,7 +137,6 @@ train_cfg = dict( ...@@ -109,7 +137,6 @@ train_cfg = dict(
add_gt_as_proposals=False), add_gt_as_proposals=False),
allowed_border=0, allowed_border=0,
pos_weight=-1, pos_weight=-1,
smoothl1_beta=1 / 9.0,
debug=False), debug=False),
rpn_proposal=dict( rpn_proposal=dict(
nms_across_levels=False, nms_across_levels=False,
......
...@@ -23,7 +23,9 @@ model = dict( ...@@ -23,7 +23,9 @@ model = dict(
anchor_strides=[4, 8, 16, 32, 64], anchor_strides=[4, 8, 16, 32, 64],
target_means=[.0, .0, .0, .0], target_means=[.0, .0, .0, .0],
target_stds=[1.0, 1.0, 1.0, 1.0], target_stds=[1.0, 1.0, 1.0, 1.0],
use_sigmoid_cls=True), loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0)),
bbox_roi_extractor=dict( bbox_roi_extractor=dict(
type='SingleRoIExtractor', type='SingleRoIExtractor',
roi_layer=dict(type='RoIAlign', out_size=7, sample_num=2), roi_layer=dict(type='RoIAlign', out_size=7, sample_num=2),
...@@ -38,7 +40,10 @@ model = dict( ...@@ -38,7 +40,10 @@ model = dict(
num_classes=81, num_classes=81,
target_means=[0., 0., 0., 0.], target_means=[0., 0., 0., 0.],
target_stds=[0.1, 0.1, 0.2, 0.2], target_stds=[0.1, 0.1, 0.2, 0.2],
reg_class_agnostic=False), reg_class_agnostic=False,
loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0, loss_weight=1.0)),
mask_roi_extractor=dict( mask_roi_extractor=dict(
type='SingleRoIExtractor', type='SingleRoIExtractor',
roi_layer=dict(type='RoIAlign', out_size=14, sample_num=2), roi_layer=dict(type='RoIAlign', out_size=14, sample_num=2),
...@@ -49,7 +54,9 @@ model = dict( ...@@ -49,7 +54,9 @@ model = dict(
num_convs=4, num_convs=4,
in_channels=256, in_channels=256,
conv_out_channels=256, conv_out_channels=256,
num_classes=81)) num_classes=81,
loss_mask=dict(
type='CrossEntropyLoss', use_mask=True, loss_weight=1.0)))
# model training and testing settings # model training and testing settings
train_cfg = dict( train_cfg = dict(
rpn=dict( rpn=dict(
...@@ -67,7 +74,6 @@ train_cfg = dict( ...@@ -67,7 +74,6 @@ train_cfg = dict(
add_gt_as_proposals=False), add_gt_as_proposals=False),
allowed_border=0, allowed_border=0,
pos_weight=-1, pos_weight=-1,
smoothl1_beta=1 / 9.0,
debug=False), debug=False),
rpn_proposal=dict( rpn_proposal=dict(
nms_across_levels=False, nms_across_levels=False,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
norm_cfg = dict(type='BN', requires_grad=False) norm_cfg = dict(type='BN', requires_grad=False)
model = dict( model = dict(
type='MaskRCNN', type='MaskRCNN',
pretrained='open-mmlab://resnet50_caffe', # pretrained='open-mmlab://resnet50_caffe',
backbone=dict( backbone=dict(
type='ResNet', type='ResNet',
depth=50, depth=50,
...@@ -32,7 +32,9 @@ model = dict( ...@@ -32,7 +32,9 @@ model = dict(
anchor_strides=[16], anchor_strides=[16],
target_means=[.0, .0, .0, .0], target_means=[.0, .0, .0, .0],
target_stds=[1.0, 1.0, 1.0, 1.0], target_stds=[1.0, 1.0, 1.0, 1.0],
use_sigmoid_cls=True), loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0)),
bbox_roi_extractor=dict( bbox_roi_extractor=dict(
type='SingleRoIExtractor', type='SingleRoIExtractor',
roi_layer=dict(type='RoIAlign', out_size=14, sample_num=2), roi_layer=dict(type='RoIAlign', out_size=14, sample_num=2),
...@@ -46,14 +48,19 @@ model = dict( ...@@ -46,14 +48,19 @@ model = dict(
num_classes=81, num_classes=81,
target_means=[0., 0., 0., 0.], target_means=[0., 0., 0., 0.],
target_stds=[0.1, 0.1, 0.2, 0.2], target_stds=[0.1, 0.1, 0.2, 0.2],
reg_class_agnostic=False), reg_class_agnostic=False,
loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0, loss_weight=1.0)),
mask_roi_extractor=None, mask_roi_extractor=None,
mask_head=dict( mask_head=dict(
type='FCNMaskHead', type='FCNMaskHead',
num_convs=0, num_convs=0,
in_channels=2048, in_channels=2048,
conv_out_channels=256, conv_out_channels=256,
num_classes=81)) num_classes=81,
loss_mask=dict(
type='CrossEntropyLoss', use_mask=True, loss_weight=1.0)))
# model training and testing settings # model training and testing settings
train_cfg = dict( train_cfg = dict(
rpn=dict( rpn=dict(
...@@ -71,7 +78,6 @@ train_cfg = dict( ...@@ -71,7 +78,6 @@ train_cfg = dict(
add_gt_as_proposals=False), add_gt_as_proposals=False),
allowed_border=0, allowed_border=0,
pos_weight=-1, pos_weight=-1,
smoothl1_beta=1 / 9.0,
debug=False), debug=False),
rpn_proposal=dict( rpn_proposal=dict(
nms_across_levels=False, nms_across_levels=False,
......
...@@ -23,7 +23,9 @@ model = dict( ...@@ -23,7 +23,9 @@ model = dict(
anchor_strides=[4, 8, 16, 32, 64], anchor_strides=[4, 8, 16, 32, 64],
target_means=[.0, .0, .0, .0], target_means=[.0, .0, .0, .0],
target_stds=[1.0, 1.0, 1.0, 1.0], target_stds=[1.0, 1.0, 1.0, 1.0],
use_sigmoid_cls=True), loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0)),
bbox_roi_extractor=dict( bbox_roi_extractor=dict(
type='SingleRoIExtractor', type='SingleRoIExtractor',
roi_layer=dict(type='RoIAlign', out_size=7, sample_num=2), roi_layer=dict(type='RoIAlign', out_size=7, sample_num=2),
...@@ -38,7 +40,10 @@ model = dict( ...@@ -38,7 +40,10 @@ model = dict(
num_classes=81, num_classes=81,
target_means=[0., 0., 0., 0.], target_means=[0., 0., 0., 0.],
target_stds=[0.1, 0.1, 0.2, 0.2], target_stds=[0.1, 0.1, 0.2, 0.2],
reg_class_agnostic=False), reg_class_agnostic=False,
loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0, loss_weight=1.0)),
mask_roi_extractor=dict( mask_roi_extractor=dict(
type='SingleRoIExtractor', type='SingleRoIExtractor',
roi_layer=dict(type='RoIAlign', out_size=14, sample_num=2), roi_layer=dict(type='RoIAlign', out_size=14, sample_num=2),
...@@ -49,7 +54,9 @@ model = dict( ...@@ -49,7 +54,9 @@ model = dict(
num_convs=4, num_convs=4,
in_channels=256, in_channels=256,
conv_out_channels=256, conv_out_channels=256,
num_classes=81)) num_classes=81,
loss_mask=dict(
type='CrossEntropyLoss', use_mask=True, loss_weight=1.0)))
# model training and testing settings # model training and testing settings
train_cfg = dict( train_cfg = dict(
rpn=dict( rpn=dict(
...@@ -67,7 +74,6 @@ train_cfg = dict( ...@@ -67,7 +74,6 @@ train_cfg = dict(
add_gt_as_proposals=False), add_gt_as_proposals=False),
allowed_border=0, allowed_border=0,
pos_weight=-1, pos_weight=-1,
smoothl1_beta=1 / 9.0,
debug=False), debug=False),
rpn_proposal=dict( rpn_proposal=dict(
nms_across_levels=False, nms_across_levels=False,
......
...@@ -25,7 +25,9 @@ model = dict( ...@@ -25,7 +25,9 @@ model = dict(
anchor_strides=[4, 8, 16, 32, 64], anchor_strides=[4, 8, 16, 32, 64],
target_means=[.0, .0, .0, .0], target_means=[.0, .0, .0, .0],
target_stds=[1.0, 1.0, 1.0, 1.0], target_stds=[1.0, 1.0, 1.0, 1.0],
use_sigmoid_cls=True), loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0)),
bbox_roi_extractor=dict( bbox_roi_extractor=dict(
type='SingleRoIExtractor', type='SingleRoIExtractor',
roi_layer=dict(type='RoIAlign', out_size=7, sample_num=2), roi_layer=dict(type='RoIAlign', out_size=7, sample_num=2),
...@@ -40,7 +42,10 @@ model = dict( ...@@ -40,7 +42,10 @@ model = dict(
num_classes=81, num_classes=81,
target_means=[0., 0., 0., 0.], target_means=[0., 0., 0., 0.],
target_stds=[0.1, 0.1, 0.2, 0.2], target_stds=[0.1, 0.1, 0.2, 0.2],
reg_class_agnostic=False), reg_class_agnostic=False,
loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0, loss_weight=1.0)),
mask_roi_extractor=dict( mask_roi_extractor=dict(
type='SingleRoIExtractor', type='SingleRoIExtractor',
roi_layer=dict(type='RoIAlign', out_size=14, sample_num=2), roi_layer=dict(type='RoIAlign', out_size=14, sample_num=2),
...@@ -51,7 +56,9 @@ model = dict( ...@@ -51,7 +56,9 @@ model = dict(
num_convs=4, num_convs=4,
in_channels=256, in_channels=256,
conv_out_channels=256, conv_out_channels=256,
num_classes=81)) num_classes=81,
loss_mask=dict(
type='CrossEntropyLoss', use_mask=True, loss_weight=1.0)))
# model training and testing settings # model training and testing settings
train_cfg = dict( train_cfg = dict(
rpn=dict( rpn=dict(
...@@ -69,7 +76,6 @@ train_cfg = dict( ...@@ -69,7 +76,6 @@ train_cfg = dict(
add_gt_as_proposals=False), add_gt_as_proposals=False),
allowed_border=0, allowed_border=0,
pos_weight=-1, pos_weight=-1,
smoothl1_beta=1 / 9.0,
debug=False), debug=False),
rpn_proposal=dict( rpn_proposal=dict(
nms_across_levels=False, nms_across_levels=False,
...@@ -171,7 +177,7 @@ log_config = dict( ...@@ -171,7 +177,7 @@ log_config = dict(
total_epochs = 12 total_epochs = 12
dist_params = dict(backend='nccl') dist_params = dict(backend='nccl')
log_level = 'INFO' log_level = 'INFO'
work_dir = './work_dirs/mask_rcnn_r50_fpn_1x' work_dir = './work_dirs/mask_rcnn_x101_32x4d_fpn_1x'
load_from = None load_from = None
resume_from = None resume_from = None
workflow = [('train', 1)] workflow = [('train', 1)]
...@@ -25,7 +25,9 @@ model = dict( ...@@ -25,7 +25,9 @@ model = dict(
anchor_strides=[4, 8, 16, 32, 64], anchor_strides=[4, 8, 16, 32, 64],
target_means=[.0, .0, .0, .0], target_means=[.0, .0, .0, .0],
target_stds=[1.0, 1.0, 1.0, 1.0], target_stds=[1.0, 1.0, 1.0, 1.0],
use_sigmoid_cls=True), loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0)),
bbox_roi_extractor=dict( bbox_roi_extractor=dict(
type='SingleRoIExtractor', type='SingleRoIExtractor',
roi_layer=dict(type='RoIAlign', out_size=7, sample_num=2), roi_layer=dict(type='RoIAlign', out_size=7, sample_num=2),
...@@ -40,7 +42,10 @@ model = dict( ...@@ -40,7 +42,10 @@ model = dict(
num_classes=81, num_classes=81,
target_means=[0., 0., 0., 0.], target_means=[0., 0., 0., 0.],
target_stds=[0.1, 0.1, 0.2, 0.2], target_stds=[0.1, 0.1, 0.2, 0.2],
reg_class_agnostic=False), reg_class_agnostic=False,
loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0, loss_weight=1.0)),
mask_roi_extractor=dict( mask_roi_extractor=dict(
type='SingleRoIExtractor', type='SingleRoIExtractor',
roi_layer=dict(type='RoIAlign', out_size=14, sample_num=2), roi_layer=dict(type='RoIAlign', out_size=14, sample_num=2),
...@@ -51,7 +56,9 @@ model = dict( ...@@ -51,7 +56,9 @@ model = dict(
num_convs=4, num_convs=4,
in_channels=256, in_channels=256,
conv_out_channels=256, conv_out_channels=256,
num_classes=81)) num_classes=81,
loss_mask=dict(
type='CrossEntropyLoss', use_mask=True, loss_weight=1.0)))
# model training and testing settings # model training and testing settings
train_cfg = dict( train_cfg = dict(
rpn=dict( rpn=dict(
...@@ -69,7 +76,6 @@ train_cfg = dict( ...@@ -69,7 +76,6 @@ train_cfg = dict(
add_gt_as_proposals=False), add_gt_as_proposals=False),
allowed_border=0, allowed_border=0,
pos_weight=-1, pos_weight=-1,
smoothl1_beta=1 / 9.0,
debug=False), debug=False),
rpn_proposal=dict( rpn_proposal=dict(
nms_across_levels=False, nms_across_levels=False,
...@@ -171,7 +177,7 @@ log_config = dict( ...@@ -171,7 +177,7 @@ log_config = dict(
total_epochs = 12 total_epochs = 12
dist_params = dict(backend='nccl') dist_params = dict(backend='nccl')
log_level = 'INFO' log_level = 'INFO'
work_dir = './work_dirs/mask_rcnn_r50_fpn_1x' work_dir = './work_dirs/mask_rcnn_x101_64x4d_fpn_1x'
load_from = None load_from = None
resume_from = None resume_from = None
workflow = [('train', 1)] workflow = [('train', 1)]
...@@ -23,7 +23,9 @@ model = dict( ...@@ -23,7 +23,9 @@ model = dict(
anchor_strides=[4, 8, 16, 32, 64], anchor_strides=[4, 8, 16, 32, 64],
target_means=[.0, .0, .0, .0], target_means=[.0, .0, .0, .0],
target_stds=[1.0, 1.0, 1.0, 1.0], target_stds=[1.0, 1.0, 1.0, 1.0],
use_sigmoid_cls=True), loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0)),
bbox_roi_extractor=dict( bbox_roi_extractor=dict(
type='SingleRoIExtractor', type='SingleRoIExtractor',
roi_layer=dict(type='RoIAlign', out_size=7, sample_num=2), roi_layer=dict(type='RoIAlign', out_size=7, sample_num=2),
...@@ -38,7 +40,10 @@ model = dict( ...@@ -38,7 +40,10 @@ model = dict(
num_classes=21, num_classes=21,
target_means=[0., 0., 0., 0.], target_means=[0., 0., 0., 0.],
target_stds=[0.1, 0.1, 0.2, 0.2], target_stds=[0.1, 0.1, 0.2, 0.2],
reg_class_agnostic=False)) reg_class_agnostic=False,
loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0, loss_weight=1.0)))
# model training and testing settings # model training and testing settings
train_cfg = dict( train_cfg = dict(
rpn=dict( rpn=dict(
...@@ -56,7 +61,6 @@ train_cfg = dict( ...@@ -56,7 +61,6 @@ train_cfg = dict(
add_gt_as_proposals=False), add_gt_as_proposals=False),
allowed_border=0, allowed_border=0,
pos_weight=-1, pos_weight=-1,
smoothl1_beta=1 / 9.0,
debug=False), debug=False),
rpn_proposal=dict( rpn_proposal=dict(
nms_across_levels=False, nms_across_levels=False,
......
...@@ -27,7 +27,14 @@ model = dict( ...@@ -27,7 +27,14 @@ model = dict(
anchor_ratios=[0.5, 1.0, 2.0], anchor_ratios=[0.5, 1.0, 2.0],
anchor_strides=[8, 16, 32, 64, 128], anchor_strides=[8, 16, 32, 64, 128],
target_means=[.0, .0, .0, .0], target_means=[.0, .0, .0, .0],
target_stds=[1.0, 1.0, 1.0, 1.0])) target_stds=[1.0, 1.0, 1.0, 1.0],
loss_cls=dict(
type='FocalLoss',
use_sigmoid=True,
gamma=2.0,
alpha=0.25,
loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=0.11, loss_weight=1.0)))
# training and testing settings # training and testing settings
train_cfg = dict( train_cfg = dict(
assigner=dict( assigner=dict(
...@@ -36,9 +43,6 @@ train_cfg = dict( ...@@ -36,9 +43,6 @@ train_cfg = dict(
neg_iou_thr=0.4, neg_iou_thr=0.4,
min_pos_iou=0, min_pos_iou=0,
ignore_iof_thr=-1), ignore_iof_thr=-1),
smoothl1_beta=0.11,
gamma=2.0,
alpha=0.25,
allowed_border=-1, allowed_border=-1,
pos_weight=-1, pos_weight=-1,
debug=False) debug=False)
......
...@@ -27,7 +27,14 @@ model = dict( ...@@ -27,7 +27,14 @@ model = dict(
anchor_ratios=[0.5, 1.0, 2.0], anchor_ratios=[0.5, 1.0, 2.0],
anchor_strides=[8, 16, 32, 64, 128], anchor_strides=[8, 16, 32, 64, 128],
target_means=[.0, .0, .0, .0], target_means=[.0, .0, .0, .0],
target_stds=[1.0, 1.0, 1.0, 1.0])) target_stds=[1.0, 1.0, 1.0, 1.0],
loss_cls=dict(
type='FocalLoss',
use_sigmoid=True,
gamma=2.0,
alpha=0.25,
loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=0.11, loss_weight=1.0)))
# training and testing settings # training and testing settings
train_cfg = dict( train_cfg = dict(
assigner=dict( assigner=dict(
...@@ -36,9 +43,6 @@ train_cfg = dict( ...@@ -36,9 +43,6 @@ train_cfg = dict(
neg_iou_thr=0.4, neg_iou_thr=0.4,
min_pos_iou=0, min_pos_iou=0,
ignore_iof_thr=-1), ignore_iof_thr=-1),
smoothl1_beta=0.11,
gamma=2.0,
alpha=0.25,
allowed_border=-1, allowed_border=-1,
pos_weight=-1, pos_weight=-1,
debug=False) debug=False)
......
...@@ -29,7 +29,14 @@ model = dict( ...@@ -29,7 +29,14 @@ model = dict(
anchor_ratios=[0.5, 1.0, 2.0], anchor_ratios=[0.5, 1.0, 2.0],
anchor_strides=[8, 16, 32, 64, 128], anchor_strides=[8, 16, 32, 64, 128],
target_means=[.0, .0, .0, .0], target_means=[.0, .0, .0, .0],
target_stds=[1.0, 1.0, 1.0, 1.0])) target_stds=[1.0, 1.0, 1.0, 1.0],
loss_cls=dict(
type='FocalLoss',
use_sigmoid=True,
gamma=2.0,
alpha=0.25,
loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=0.11, loss_weight=1.0)))
# training and testing settings # training and testing settings
train_cfg = dict( train_cfg = dict(
assigner=dict( assigner=dict(
...@@ -38,9 +45,6 @@ train_cfg = dict( ...@@ -38,9 +45,6 @@ train_cfg = dict(
neg_iou_thr=0.4, neg_iou_thr=0.4,
min_pos_iou=0, min_pos_iou=0,
ignore_iof_thr=-1), ignore_iof_thr=-1),
smoothl1_beta=0.11,
gamma=2.0,
alpha=0.25,
allowed_border=-1, allowed_border=-1,
pos_weight=-1, pos_weight=-1,
debug=False) debug=False)
...@@ -116,7 +120,7 @@ total_epochs = 12 ...@@ -116,7 +120,7 @@ total_epochs = 12
device_ids = range(8) device_ids = range(8)
dist_params = dict(backend='nccl') dist_params = dict(backend='nccl')
log_level = 'INFO' log_level = 'INFO'
work_dir = './work_dirs/retinanet_r50_fpn_1x' work_dir = './work_dirs/retinanet_x101_32x4d_fpn_1x'
load_from = None load_from = None
resume_from = None resume_from = None
workflow = [('train', 1)] workflow = [('train', 1)]
...@@ -29,7 +29,14 @@ model = dict( ...@@ -29,7 +29,14 @@ model = dict(
anchor_ratios=[0.5, 1.0, 2.0], anchor_ratios=[0.5, 1.0, 2.0],
anchor_strides=[8, 16, 32, 64, 128], anchor_strides=[8, 16, 32, 64, 128],
target_means=[.0, .0, .0, .0], target_means=[.0, .0, .0, .0],
target_stds=[1.0, 1.0, 1.0, 1.0])) target_stds=[1.0, 1.0, 1.0, 1.0],
loss_cls=dict(
type='FocalLoss',
use_sigmoid=True,
gamma=2.0,
alpha=0.25,
loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=0.11, loss_weight=1.0)))
# training and testing settings # training and testing settings
train_cfg = dict( train_cfg = dict(
assigner=dict( assigner=dict(
...@@ -38,9 +45,6 @@ train_cfg = dict( ...@@ -38,9 +45,6 @@ train_cfg = dict(
neg_iou_thr=0.4, neg_iou_thr=0.4,
min_pos_iou=0, min_pos_iou=0,
ignore_iof_thr=-1), ignore_iof_thr=-1),
smoothl1_beta=0.11,
gamma=2.0,
alpha=0.25,
allowed_border=-1, allowed_border=-1,
pos_weight=-1, pos_weight=-1,
debug=False) debug=False)
...@@ -116,7 +120,7 @@ total_epochs = 12 ...@@ -116,7 +120,7 @@ total_epochs = 12
device_ids = range(8) device_ids = range(8)
dist_params = dict(backend='nccl') dist_params = dict(backend='nccl')
log_level = 'INFO' log_level = 'INFO'
work_dir = './work_dirs/retinanet_r50_fpn_1x' work_dir = './work_dirs/retinanet_x101_64x4d_fpn_1x'
load_from = None load_from = None
resume_from = None resume_from = None
workflow = [('train', 1)] workflow = [('train', 1)]
...@@ -23,7 +23,9 @@ model = dict( ...@@ -23,7 +23,9 @@ model = dict(
anchor_strides=[4, 8, 16, 32, 64], anchor_strides=[4, 8, 16, 32, 64],
target_means=[.0, .0, .0, .0], target_means=[.0, .0, .0, .0],
target_stds=[1.0, 1.0, 1.0, 1.0], target_stds=[1.0, 1.0, 1.0, 1.0],
use_sigmoid_cls=True)) loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0)))
# model training and testing settings # model training and testing settings
train_cfg = dict( train_cfg = dict(
rpn=dict( rpn=dict(
...@@ -41,7 +43,6 @@ train_cfg = dict( ...@@ -41,7 +43,6 @@ train_cfg = dict(
add_gt_as_proposals=False), add_gt_as_proposals=False),
allowed_border=0, allowed_border=0,
pos_weight=-1, pos_weight=-1,
smoothl1_beta=1 / 9.0,
debug=False)) debug=False))
test_cfg = dict( test_cfg = dict(
rpn=dict( rpn=dict(
......
...@@ -23,7 +23,9 @@ model = dict( ...@@ -23,7 +23,9 @@ model = dict(
anchor_strides=[16], anchor_strides=[16],
target_means=[.0, .0, .0, .0], target_means=[.0, .0, .0, .0],
target_stds=[1.0, 1.0, 1.0, 1.0], target_stds=[1.0, 1.0, 1.0, 1.0],
use_sigmoid_cls=True)) loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0)))
# model training and testing settings # model training and testing settings
train_cfg = dict( train_cfg = dict(
rpn=dict( rpn=dict(
...@@ -41,7 +43,6 @@ train_cfg = dict( ...@@ -41,7 +43,6 @@ train_cfg = dict(
add_gt_as_proposals=False), add_gt_as_proposals=False),
allowed_border=0, allowed_border=0,
pos_weight=-1, pos_weight=-1,
smoothl1_beta=1 / 9.0,
debug=False)) debug=False))
test_cfg = dict( test_cfg = dict(
rpn=dict( rpn=dict(
......
...@@ -23,7 +23,9 @@ model = dict( ...@@ -23,7 +23,9 @@ model = dict(
anchor_strides=[4, 8, 16, 32, 64], anchor_strides=[4, 8, 16, 32, 64],
target_means=[.0, .0, .0, .0], target_means=[.0, .0, .0, .0],
target_stds=[1.0, 1.0, 1.0, 1.0], target_stds=[1.0, 1.0, 1.0, 1.0],
use_sigmoid_cls=True)) loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0)))
# model training and testing settings # model training and testing settings
train_cfg = dict( train_cfg = dict(
rpn=dict( rpn=dict(
...@@ -41,7 +43,6 @@ train_cfg = dict( ...@@ -41,7 +43,6 @@ train_cfg = dict(
add_gt_as_proposals=False), add_gt_as_proposals=False),
allowed_border=0, allowed_border=0,
pos_weight=-1, pos_weight=-1,
smoothl1_beta=1 / 9.0,
debug=False)) debug=False))
test_cfg = dict( test_cfg = dict(
rpn=dict( rpn=dict(
......
...@@ -25,7 +25,9 @@ model = dict( ...@@ -25,7 +25,9 @@ model = dict(
anchor_strides=[4, 8, 16, 32, 64], anchor_strides=[4, 8, 16, 32, 64],
target_means=[.0, .0, .0, .0], target_means=[.0, .0, .0, .0],
target_stds=[1.0, 1.0, 1.0, 1.0], target_stds=[1.0, 1.0, 1.0, 1.0],
use_sigmoid_cls=True)) loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0)))
# model training and testing settings # model training and testing settings
train_cfg = dict( train_cfg = dict(
rpn=dict( rpn=dict(
...@@ -43,7 +45,6 @@ train_cfg = dict( ...@@ -43,7 +45,6 @@ train_cfg = dict(
add_gt_as_proposals=False), add_gt_as_proposals=False),
allowed_border=0, allowed_border=0,
pos_weight=-1, pos_weight=-1,
smoothl1_beta=1 / 9.0,
debug=False)) debug=False))
test_cfg = dict( test_cfg = dict(
rpn=dict( rpn=dict(
...@@ -117,7 +118,7 @@ log_config = dict( ...@@ -117,7 +118,7 @@ log_config = dict(
total_epochs = 12 total_epochs = 12
dist_params = dict(backend='nccl') dist_params = dict(backend='nccl')
log_level = 'INFO' log_level = 'INFO'
work_dir = './work_dirs/rpn_r101_fpn_1x' work_dir = './work_dirs/rpn_x101_32x4d_fpn_1x'
load_from = None load_from = None
resume_from = None resume_from = None
workflow = [('train', 1)] workflow = [('train', 1)]
...@@ -25,7 +25,9 @@ model = dict( ...@@ -25,7 +25,9 @@ model = dict(
anchor_strides=[4, 8, 16, 32, 64], anchor_strides=[4, 8, 16, 32, 64],
target_means=[.0, .0, .0, .0], target_means=[.0, .0, .0, .0],
target_stds=[1.0, 1.0, 1.0, 1.0], target_stds=[1.0, 1.0, 1.0, 1.0],
use_sigmoid_cls=True)) loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0)))
# model training and testing settings # model training and testing settings
train_cfg = dict( train_cfg = dict(
rpn=dict( rpn=dict(
...@@ -43,7 +45,6 @@ train_cfg = dict( ...@@ -43,7 +45,6 @@ train_cfg = dict(
add_gt_as_proposals=False), add_gt_as_proposals=False),
allowed_border=0, allowed_border=0,
pos_weight=-1, pos_weight=-1,
smoothl1_beta=1 / 9.0,
debug=False)) debug=False))
test_cfg = dict( test_cfg = dict(
rpn=dict( rpn=dict(
...@@ -117,7 +118,7 @@ log_config = dict( ...@@ -117,7 +118,7 @@ log_config = dict(
total_epochs = 12 total_epochs = 12
dist_params = dict(backend='nccl') dist_params = dict(backend='nccl')
log_level = 'INFO' log_level = 'INFO'
work_dir = './work_dirs/rpn_r101_fpn_1x' work_dir = './work_dirs/rpn_x101_64x4d_fpn_1x'
load_from = None load_from = None
resume_from = None resume_from = None
workflow = [('train', 1)] workflow = [('train', 1)]
...@@ -27,7 +27,9 @@ model = dict( ...@@ -27,7 +27,9 @@ model = dict(
anchor_strides=[4, 8, 16, 32, 64], anchor_strides=[4, 8, 16, 32, 64],
target_means=[.0, .0, .0, .0], target_means=[.0, .0, .0, .0],
target_stds=[1.0, 1.0, 1.0, 1.0], target_stds=[1.0, 1.0, 1.0, 1.0],
use_sigmoid_cls=True), loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0)),
bbox_roi_extractor=dict( bbox_roi_extractor=dict(
type='SingleRoIExtractor', type='SingleRoIExtractor',
roi_layer=dict(type='RoIAlign', out_size=7, sample_num=2), roi_layer=dict(type='RoIAlign', out_size=7, sample_num=2),
...@@ -45,7 +47,10 @@ model = dict( ...@@ -45,7 +47,10 @@ model = dict(
target_means=[0., 0., 0., 0.], target_means=[0., 0., 0., 0.],
target_stds=[0.1, 0.1, 0.2, 0.2], target_stds=[0.1, 0.1, 0.2, 0.2],
reg_class_agnostic=False, reg_class_agnostic=False,
norm_cfg=norm_cfg)) norm_cfg=norm_cfg,
loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0, loss_weight=1.0)))
# model training and testing settings # model training and testing settings
train_cfg = dict( train_cfg = dict(
rpn=dict( rpn=dict(
...@@ -63,7 +68,6 @@ train_cfg = dict( ...@@ -63,7 +68,6 @@ train_cfg = dict(
add_gt_as_proposals=False), add_gt_as_proposals=False),
allowed_border=0, allowed_border=0,
pos_weight=-1, pos_weight=-1,
smoothl1_beta=1 / 9.0,
debug=False), debug=False),
rpn_proposal=dict( rpn_proposal=dict(
nms_across_levels=False, nms_across_levels=False,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment