Unverified Commit a481f5a8 authored by xiliu8006's avatar xiliu8006 Committed by GitHub
Browse files

[Enhance] Move train_cfg test_cfg to model (#307)

* Move train_cfg/test_cfg to model

* Move train_cfg/test_cfg to model

* Move train_cfg/test_cfg to model

* Move train_cfg/test_cfg to model

* Move train_cfg/test_cfg to model

* Move train_cfg/test_cfg to model

* Move train_cfg/test_cfg to model

* Move train_cfg and test_cfg into model

* modify centerpoint configs

* Modify docs

* modify build_detector

* modify test_config_build_detector

* modify build_detector parameters

* Adopt the same strategy in build_detector
parent a347ac75
...@@ -65,17 +65,16 @@ model = dict( ...@@ -65,17 +65,16 @@ model = dict(
type='SmoothL1Loss', reduction='sum', loss_weight=1.0), type='SmoothL1Loss', reduction='sum', loss_weight=1.0),
corner_loss=dict( corner_loss=dict(
type='SmoothL1Loss', reduction='sum', loss_weight=1.0), type='SmoothL1Loss', reduction='sum', loss_weight=1.0),
vote_loss=dict(type='SmoothL1Loss', reduction='sum', loss_weight=1.0))) vote_loss=dict(type='SmoothL1Loss', reduction='sum', loss_weight=1.0)),
# model training and testing settings
# model training and testing settings train_cfg=dict(
train_cfg = dict( sample_mod='spec', pos_distance_thr=10.0, expand_dims_length=0.05),
sample_mod='spec', pos_distance_thr=10.0, expand_dims_length=0.05) test_cfg=dict(
test_cfg = dict( nms_cfg=dict(type='nms', iou_thr=0.1),
nms_cfg=dict(type='nms', iou_thr=0.1), sample_mod='spec',
sample_mod='spec', score_thr=0.0,
score_thr=0.0, per_class_proposal=True,
per_class_proposal=True, max_output_num=100))
max_output_num=100)
# optimizer # optimizer
# This schedule is mainly used by models on indoor dataset, # This schedule is mainly used by models on indoor dataset,
......
...@@ -105,96 +105,96 @@ model = dict( ...@@ -105,96 +105,96 @@ model = dict(
conv_out_channels=256, conv_out_channels=256,
num_classes=80, num_classes=80,
loss_mask=dict( loss_mask=dict(
type='CrossEntropyLoss', use_mask=True, loss_weight=1.0)))) 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(
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.7,
neg_iou_thr=0.3,
min_pos_iou=0.3,
match_low_quality=True,
ignore_iof_thr=-1),
sampler=dict(
type='RandomSampler',
num=256,
pos_fraction=0.5,
neg_pos_ub=-1,
add_gt_as_proposals=False),
allowed_border=0,
pos_weight=-1,
debug=False),
rpn_proposal=dict(
nms_across_levels=False,
nms_pre=2000,
nms_post=2000,
max_num=2000,
nms_thr=0.7,
min_bbox_size=0),
rcnn=[
dict(
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.5,
neg_iou_thr=0.5,
min_pos_iou=0.5,
match_low_quality=False,
ignore_iof_thr=-1),
sampler=dict(
type='RandomSampler',
num=512,
pos_fraction=0.25,
neg_pos_ub=-1,
add_gt_as_proposals=True),
mask_size=28,
pos_weight=-1,
debug=False),
dict(
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.6,
neg_iou_thr=0.6,
min_pos_iou=0.6,
match_low_quality=False,
ignore_iof_thr=-1),
sampler=dict(
type='RandomSampler',
num=512,
pos_fraction=0.25,
neg_pos_ub=-1,
add_gt_as_proposals=True),
mask_size=28,
pos_weight=-1,
debug=False),
dict(
assigner=dict( assigner=dict(
type='MaxIoUAssigner', type='MaxIoUAssigner',
pos_iou_thr=0.7, pos_iou_thr=0.7,
neg_iou_thr=0.7, neg_iou_thr=0.3,
min_pos_iou=0.7, min_pos_iou=0.3,
match_low_quality=False, match_low_quality=True,
ignore_iof_thr=-1), ignore_iof_thr=-1),
sampler=dict( sampler=dict(
type='RandomSampler', type='RandomSampler',
num=512, num=256,
pos_fraction=0.25, pos_fraction=0.5,
neg_pos_ub=-1, neg_pos_ub=-1,
add_gt_as_proposals=True), add_gt_as_proposals=False),
mask_size=28, allowed_border=0,
pos_weight=-1, pos_weight=-1,
debug=False) debug=False),
]) rpn_proposal=dict(
test_cfg = dict( nms_across_levels=False,
rpn=dict( nms_pre=2000,
nms_across_levels=False, nms_post=2000,
nms_pre=1000, max_num=2000,
nms_post=1000, nms_thr=0.7,
max_num=1000, min_bbox_size=0),
nms_thr=0.7, rcnn=[
min_bbox_size=0), dict(
rcnn=dict( assigner=dict(
score_thr=0.05, type='MaxIoUAssigner',
nms=dict(type='nms', iou_threshold=0.5), pos_iou_thr=0.5,
max_per_img=100, neg_iou_thr=0.5,
mask_thr_binary=0.5)) min_pos_iou=0.5,
match_low_quality=False,
ignore_iof_thr=-1),
sampler=dict(
type='RandomSampler',
num=512,
pos_fraction=0.25,
neg_pos_ub=-1,
add_gt_as_proposals=True),
mask_size=28,
pos_weight=-1,
debug=False),
dict(
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.6,
neg_iou_thr=0.6,
min_pos_iou=0.6,
match_low_quality=False,
ignore_iof_thr=-1),
sampler=dict(
type='RandomSampler',
num=512,
pos_fraction=0.25,
neg_pos_ub=-1,
add_gt_as_proposals=True),
mask_size=28,
pos_weight=-1,
debug=False),
dict(
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.7,
neg_iou_thr=0.7,
min_pos_iou=0.7,
match_low_quality=False,
ignore_iof_thr=-1),
sampler=dict(
type='RandomSampler',
num=512,
pos_fraction=0.25,
neg_pos_ub=-1,
add_gt_as_proposals=True),
mask_size=28,
pos_weight=-1,
debug=False)
]),
test_cfg=dict(
rpn=dict(
nms_across_levels=False,
nms_pre=1000,
nms_post=1000,
max_num=1000,
nms_thr=0.7,
min_bbox_size=0),
rcnn=dict(
score_thr=0.05,
nms=dict(type='nms', iou_threshold=0.5),
max_per_img=100,
mask_thr_binary=0.5)))
...@@ -56,28 +56,28 @@ model = dict( ...@@ -56,28 +56,28 @@ model = dict(
type='SeparateHead', init_bias=-2.19, final_kernel=3), type='SeparateHead', init_bias=-2.19, final_kernel=3),
loss_cls=dict(type='GaussianFocalLoss', reduction='mean'), loss_cls=dict(type='GaussianFocalLoss', reduction='mean'),
loss_bbox=dict(type='L1Loss', reduction='mean', loss_weight=0.25), loss_bbox=dict(type='L1Loss', reduction='mean', loss_weight=0.25),
norm_bbox=True)) norm_bbox=True),
# model training and testing settings # model training and testing settings
train_cfg = dict( train_cfg=dict(
pts=dict( pts=dict(
grid_size=[1024, 1024, 40], grid_size=[1024, 1024, 40],
voxel_size=voxel_size, voxel_size=voxel_size,
out_size_factor=8, out_size_factor=8,
dense_reg=1, dense_reg=1,
gaussian_overlap=0.1, gaussian_overlap=0.1,
max_objs=500, max_objs=500,
min_radius=2, min_radius=2,
code_weights=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.2, 0.2])) code_weights=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.2, 0.2])),
test_cfg = dict( test_cfg=dict(
pts=dict( pts=dict(
post_center_limit_range=[-61.2, -61.2, -10.0, 61.2, 61.2, 10.0], post_center_limit_range=[-61.2, -61.2, -10.0, 61.2, 61.2, 10.0],
max_per_img=500, max_per_img=500,
max_pool_nms=False, max_pool_nms=False,
min_radius=[4, 12, 10, 1, 0.85, 0.175], min_radius=[4, 12, 10, 1, 0.85, 0.175],
score_threshold=0.1, score_threshold=0.1,
out_size_factor=8, out_size_factor=8,
voxel_size=voxel_size[:2], voxel_size=voxel_size[:2],
nms_type='rotate', nms_type='rotate',
pre_max_size=1000, pre_max_size=1000,
post_max_size=83, post_max_size=83,
nms_thr=0.2)) nms_thr=0.2)))
...@@ -55,29 +55,29 @@ model = dict( ...@@ -55,29 +55,29 @@ model = dict(
type='SeparateHead', init_bias=-2.19, final_kernel=3), type='SeparateHead', init_bias=-2.19, final_kernel=3),
loss_cls=dict(type='GaussianFocalLoss', reduction='mean'), loss_cls=dict(type='GaussianFocalLoss', reduction='mean'),
loss_bbox=dict(type='L1Loss', reduction='mean', loss_weight=0.25), loss_bbox=dict(type='L1Loss', reduction='mean', loss_weight=0.25),
norm_bbox=True)) norm_bbox=True),
# model training and testing settings # model training and testing settings
train_cfg = dict( train_cfg=dict(
pts=dict( pts=dict(
grid_size=[512, 512, 1], grid_size=[512, 512, 1],
voxel_size=voxel_size, voxel_size=voxel_size,
out_size_factor=4, out_size_factor=4,
dense_reg=1, dense_reg=1,
gaussian_overlap=0.1, gaussian_overlap=0.1,
max_objs=500, max_objs=500,
min_radius=2, min_radius=2,
code_weights=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.2, 0.2])) code_weights=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.2, 0.2])),
test_cfg = dict( test_cfg=dict(
pts=dict( pts=dict(
post_center_limit_range=[-61.2, -61.2, -10.0, 61.2, 61.2, 10.0], post_center_limit_range=[-61.2, -61.2, -10.0, 61.2, 61.2, 10.0],
max_per_img=500, max_per_img=500,
max_pool_nms=False, max_pool_nms=False,
min_radius=[4, 12, 10, 1, 0.85, 0.175], min_radius=[4, 12, 10, 1, 0.85, 0.175],
score_threshold=0.1, score_threshold=0.1,
pc_range=[-51.2, -51.2], pc_range=[-51.2, -51.2],
out_size_factor=4, out_size_factor=4,
voxel_size=voxel_size[:2], voxel_size=voxel_size[:2],
nms_type='rotate', nms_type='rotate',
pre_max_size=1000, pre_max_size=1000,
post_max_size=83, post_max_size=83,
nms_thr=0.2)) nms_thr=0.2)))
...@@ -311,32 +311,31 @@ model = dict( ...@@ -311,32 +311,31 @@ model = dict(
reduction='none', reduction='none',
loss_weight=5.0), loss_weight=5.0),
primitive_center_loss=dict( primitive_center_loss=dict(
type='MSELoss', reduction='none', loss_weight=1.0)))) type='MSELoss', reduction='none', loss_weight=1.0))),
# model training and testing settings
# model training and testing settings train_cfg=dict(
train_cfg = dict( rpn=dict(
rpn=dict(pos_distance_thr=0.3, neg_distance_thr=0.6, sample_mod='vote'), pos_distance_thr=0.3, neg_distance_thr=0.6, sample_mod='vote'),
rpn_proposal=dict(use_nms=False), rpn_proposal=dict(use_nms=False),
rcnn=dict( rcnn=dict(
pos_distance_thr=0.3, pos_distance_thr=0.3,
neg_distance_thr=0.6, neg_distance_thr=0.6,
sample_mod='vote', sample_mod='vote',
far_threshold=0.6, far_threshold=0.6,
near_threshold=0.3, near_threshold=0.3,
mask_surface_threshold=0.3, mask_surface_threshold=0.3,
label_surface_threshold=0.3, label_surface_threshold=0.3,
mask_line_threshold=0.3, mask_line_threshold=0.3,
label_line_threshold=0.3)) label_line_threshold=0.3)),
test_cfg=dict(
test_cfg = dict( rpn=dict(
rpn=dict( sample_mod='seed',
sample_mod='seed', nms_thr=0.25,
nms_thr=0.25, score_thr=0.05,
score_thr=0.05, per_class_proposal=True,
per_class_proposal=True, use_nms=False),
use_nms=False), rcnn=dict(
rcnn=dict( sample_mod='seed',
sample_mod='seed', nms_thr=0.25,
nms_thr=0.25, score_thr=0.05,
score_thr=0.05, per_class_proposal=True)))
per_class_proposal=True))
...@@ -17,6 +17,6 @@ model = dict( ...@@ -17,6 +17,6 @@ model = dict(
num_classes=9, num_classes=9,
anchor_generator=dict( anchor_generator=dict(
ranges=[[-80, -80, -1.8, 80, 80, -1.8]], custom_values=[]), ranges=[[-80, -80, -1.8, 80, 80, -1.8]], custom_values=[]),
bbox_coder=dict(type='DeltaXYZWLHRBBoxCoder', code_size=7))) bbox_coder=dict(type='DeltaXYZWLHRBBoxCoder', code_size=7)),
# model training settings (based on nuScenes model settings) # model training settings (based on nuScenes model settings)
train_cfg = dict(pts=dict(code_weight=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0])) train_cfg=dict(pts=dict(code_weight=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0])))
...@@ -70,27 +70,27 @@ model = dict( ...@@ -70,27 +70,27 @@ model = dict(
loss_weight=1.0), loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0), loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0),
loss_dir=dict( loss_dir=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.2))) type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.2)),
# model training and testing settings # model training and testing settings
train_cfg = dict( train_cfg=dict(
pts=dict( pts=dict(
assigner=dict( assigner=dict(
type='MaxIoUAssigner', type='MaxIoUAssigner',
iou_calculator=dict(type='BboxOverlapsNearest3D'), iou_calculator=dict(type='BboxOverlapsNearest3D'),
pos_iou_thr=0.6, pos_iou_thr=0.6,
neg_iou_thr=0.3, neg_iou_thr=0.3,
min_pos_iou=0.3, min_pos_iou=0.3,
ignore_iof_thr=-1), ignore_iof_thr=-1),
allowed_border=0, allowed_border=0,
code_weight=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.2, 0.2], code_weight=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.2, 0.2],
pos_weight=-1, pos_weight=-1,
debug=False)) debug=False)),
test_cfg = dict( test_cfg=dict(
pts=dict( pts=dict(
use_rotate_nms=True, use_rotate_nms=True,
nms_across_levels=False, nms_across_levels=False,
nms_pre=1000, nms_pre=1000,
nms_thr=0.2, nms_thr=0.2,
score_thr=0.05, score_thr=0.05,
min_bbox_size=0, min_bbox_size=0,
max_num=500)) max_num=500)))
...@@ -17,6 +17,6 @@ model = dict( ...@@ -17,6 +17,6 @@ model = dict(
num_classes=9, num_classes=9,
anchor_generator=dict( anchor_generator=dict(
ranges=[[-100, -100, -1.8, 100, 100, -1.8]], custom_values=[]), ranges=[[-100, -100, -1.8, 100, 100, -1.8]], custom_values=[]),
bbox_coder=dict(type='DeltaXYZWLHRBBoxCoder', code_size=7))) bbox_coder=dict(type='DeltaXYZWLHRBBoxCoder', code_size=7)),
# model training settings (based on nuScenes model settings) # model training settings (based on nuScenes model settings)
train_cfg = dict(pts=dict(code_weight=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0])) train_cfg=dict(pts=dict(code_weight=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0])))
...@@ -52,40 +52,40 @@ model = dict( ...@@ -52,40 +52,40 @@ model = dict(
loss_weight=1.0), loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=2.0), loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=2.0),
loss_dir=dict( loss_dir=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.2))) type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.2)),
# model training and testing settings # model training and testing settings
train_cfg = dict( train_cfg=dict(
assigner=[ assigner=[
dict( # for Pedestrian dict( # for Pedestrian
type='MaxIoUAssigner', type='MaxIoUAssigner',
iou_calculator=dict(type='BboxOverlapsNearest3D'), iou_calculator=dict(type='BboxOverlapsNearest3D'),
pos_iou_thr=0.5, pos_iou_thr=0.5,
neg_iou_thr=0.35, neg_iou_thr=0.35,
min_pos_iou=0.35, min_pos_iou=0.35,
ignore_iof_thr=-1), ignore_iof_thr=-1),
dict( # for Cyclist dict( # for Cyclist
type='MaxIoUAssigner', type='MaxIoUAssigner',
iou_calculator=dict(type='BboxOverlapsNearest3D'), iou_calculator=dict(type='BboxOverlapsNearest3D'),
pos_iou_thr=0.5, pos_iou_thr=0.5,
neg_iou_thr=0.35, neg_iou_thr=0.35,
min_pos_iou=0.35, min_pos_iou=0.35,
ignore_iof_thr=-1), ignore_iof_thr=-1),
dict( # for Car dict( # for Car
type='MaxIoUAssigner', type='MaxIoUAssigner',
iou_calculator=dict(type='BboxOverlapsNearest3D'), iou_calculator=dict(type='BboxOverlapsNearest3D'),
pos_iou_thr=0.6, pos_iou_thr=0.6,
neg_iou_thr=0.45, neg_iou_thr=0.45,
min_pos_iou=0.45, min_pos_iou=0.45,
ignore_iof_thr=-1), ignore_iof_thr=-1),
], ],
allowed_border=0, allowed_border=0,
pos_weight=-1, pos_weight=-1,
debug=False) debug=False),
test_cfg = dict( test_cfg=dict(
use_rotate_nms=True, use_rotate_nms=True,
nms_across_levels=False, nms_across_levels=False,
nms_thr=0.01, nms_thr=0.01,
score_thr=0.1, score_thr=0.1,
min_bbox_size=0, min_bbox_size=0,
nms_pre=100, nms_pre=100,
max_num=50) max_num=50))
...@@ -66,44 +66,43 @@ model = dict( ...@@ -66,44 +66,43 @@ model = dict(
loss_weight=1.0), loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0), loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0),
loss_dir=dict( loss_dir=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.2))) type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.2)),
# model training and testing settings # model training and testing settings
train_cfg = dict( train_cfg=dict(
pts=dict( pts=dict(
assigner=[ assigner=[
dict( # car dict( # car
type='MaxIoUAssigner', type='MaxIoUAssigner',
iou_calculator=dict(type='BboxOverlapsNearest3D'), iou_calculator=dict(type='BboxOverlapsNearest3D'),
pos_iou_thr=0.55, pos_iou_thr=0.55,
neg_iou_thr=0.4, neg_iou_thr=0.4,
min_pos_iou=0.4, min_pos_iou=0.4,
ignore_iof_thr=-1), ignore_iof_thr=-1),
dict( # cyclist dict( # cyclist
type='MaxIoUAssigner', type='MaxIoUAssigner',
iou_calculator=dict(type='BboxOverlapsNearest3D'), iou_calculator=dict(type='BboxOverlapsNearest3D'),
pos_iou_thr=0.5, pos_iou_thr=0.5,
neg_iou_thr=0.3, neg_iou_thr=0.3,
min_pos_iou=0.3, min_pos_iou=0.3,
ignore_iof_thr=-1), ignore_iof_thr=-1),
dict( # pedestrian dict( # pedestrian
type='MaxIoUAssigner', type='MaxIoUAssigner',
iou_calculator=dict(type='BboxOverlapsNearest3D'), iou_calculator=dict(type='BboxOverlapsNearest3D'),
pos_iou_thr=0.5, pos_iou_thr=0.5,
neg_iou_thr=0.3, neg_iou_thr=0.3,
min_pos_iou=0.3, min_pos_iou=0.3,
ignore_iof_thr=-1), ignore_iof_thr=-1),
], ],
allowed_border=0, allowed_border=0,
code_weight=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], code_weight=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
pos_weight=-1, pos_weight=-1,
debug=False)) debug=False)),
test_cfg=dict(
test_cfg = dict( pts=dict(
pts=dict( use_rotate_nms=True,
use_rotate_nms=True, nms_across_levels=False,
nms_across_levels=False, nms_pre=4096,
nms_pre=4096, nms_thr=0.25,
nms_thr=0.25, score_thr=0.1,
score_thr=0.1, min_bbox_size=0,
min_bbox_size=0, max_num=500)))
max_num=500))
...@@ -48,40 +48,40 @@ model = dict( ...@@ -48,40 +48,40 @@ model = dict(
loss_weight=1.0), loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=2.0), loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=2.0),
loss_dir=dict( loss_dir=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.2))) type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.2)),
# model training and testing settings # model training and testing settings
train_cfg = dict( train_cfg=dict(
assigner=[ assigner=[
dict( # for Pedestrian dict( # for Pedestrian
type='MaxIoUAssigner', type='MaxIoUAssigner',
iou_calculator=dict(type='BboxOverlapsNearest3D'), iou_calculator=dict(type='BboxOverlapsNearest3D'),
pos_iou_thr=0.35, pos_iou_thr=0.35,
neg_iou_thr=0.2, neg_iou_thr=0.2,
min_pos_iou=0.2, min_pos_iou=0.2,
ignore_iof_thr=-1), ignore_iof_thr=-1),
dict( # for Cyclist dict( # for Cyclist
type='MaxIoUAssigner', type='MaxIoUAssigner',
iou_calculator=dict(type='BboxOverlapsNearest3D'), iou_calculator=dict(type='BboxOverlapsNearest3D'),
pos_iou_thr=0.35, pos_iou_thr=0.35,
neg_iou_thr=0.2, neg_iou_thr=0.2,
min_pos_iou=0.2, min_pos_iou=0.2,
ignore_iof_thr=-1), ignore_iof_thr=-1),
dict( # for Car dict( # for Car
type='MaxIoUAssigner', type='MaxIoUAssigner',
iou_calculator=dict(type='BboxOverlapsNearest3D'), iou_calculator=dict(type='BboxOverlapsNearest3D'),
pos_iou_thr=0.6, pos_iou_thr=0.6,
neg_iou_thr=0.45, neg_iou_thr=0.45,
min_pos_iou=0.45, min_pos_iou=0.45,
ignore_iof_thr=-1), ignore_iof_thr=-1),
], ],
allowed_border=0, allowed_border=0,
pos_weight=-1, pos_weight=-1,
debug=False) debug=False),
test_cfg = dict( test_cfg=dict(
use_rotate_nms=True, use_rotate_nms=True,
nms_across_levels=False, nms_across_levels=False,
nms_thr=0.01, nms_thr=0.01,
score_thr=0.1, score_thr=0.1,
min_bbox_size=0, min_bbox_size=0,
nms_pre=100, nms_pre=100,
max_num=50) max_num=50))
...@@ -60,42 +60,41 @@ model = dict( ...@@ -60,42 +60,41 @@ model = dict(
loss_weight=1.0), loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0), loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0),
loss_dir=dict( loss_dir=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.2))) type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.2)),
# model training and testing settings # model training and testing settings
train_cfg = dict( train_cfg=dict(
assigner=[ assigner=[
dict( # car dict( # car
type='MaxIoUAssigner', type='MaxIoUAssigner',
iou_calculator=dict(type='BboxOverlapsNearest3D'), iou_calculator=dict(type='BboxOverlapsNearest3D'),
pos_iou_thr=0.55, pos_iou_thr=0.55,
neg_iou_thr=0.4, neg_iou_thr=0.4,
min_pos_iou=0.4, min_pos_iou=0.4,
ignore_iof_thr=-1), ignore_iof_thr=-1),
dict( # pedestrian dict( # pedestrian
type='MaxIoUAssigner', type='MaxIoUAssigner',
iou_calculator=dict(type='BboxOverlapsNearest3D'), iou_calculator=dict(type='BboxOverlapsNearest3D'),
pos_iou_thr=0.5, pos_iou_thr=0.5,
neg_iou_thr=0.3, neg_iou_thr=0.3,
min_pos_iou=0.3, min_pos_iou=0.3,
ignore_iof_thr=-1), ignore_iof_thr=-1),
dict( # cyclist dict( # cyclist
type='MaxIoUAssigner', type='MaxIoUAssigner',
iou_calculator=dict(type='BboxOverlapsNearest3D'), iou_calculator=dict(type='BboxOverlapsNearest3D'),
pos_iou_thr=0.5, pos_iou_thr=0.5,
neg_iou_thr=0.3, neg_iou_thr=0.3,
min_pos_iou=0.3, min_pos_iou=0.3,
ignore_iof_thr=-1) ignore_iof_thr=-1)
], ],
allowed_border=0, allowed_border=0,
code_weight=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], code_weight=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
pos_weight=-1, pos_weight=-1,
debug=False) debug=False),
test_cfg=dict(
test_cfg = dict( use_rotate_nms=True,
use_rotate_nms=True, nms_across_levels=False,
nms_across_levels=False, nms_pre=4096,
nms_pre=4096, nms_thr=0.25,
nms_thr=0.25, score_thr=0.1,
score_thr=0.1, min_bbox_size=0,
min_bbox_size=0, max_num=500))
max_num=500)
...@@ -65,60 +65,60 @@ model = dict( ...@@ -65,60 +65,60 @@ model = dict(
conv_out_channels=256, conv_out_channels=256,
num_classes=80, num_classes=80,
loss_mask=dict( loss_mask=dict(
type='CrossEntropyLoss', use_mask=True, loss_weight=1.0)))) 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(
assigner=dict( assigner=dict(
type='MaxIoUAssigner', type='MaxIoUAssigner',
pos_iou_thr=0.7, pos_iou_thr=0.7,
neg_iou_thr=0.3, neg_iou_thr=0.3,
min_pos_iou=0.3, min_pos_iou=0.3,
match_low_quality=True, match_low_quality=True,
ignore_iof_thr=-1), ignore_iof_thr=-1),
sampler=dict( sampler=dict(
type='RandomSampler', type='RandomSampler',
num=256, num=256,
pos_fraction=0.5, pos_fraction=0.5,
neg_pos_ub=-1, neg_pos_ub=-1,
add_gt_as_proposals=False), add_gt_as_proposals=False),
allowed_border=-1, allowed_border=-1,
pos_weight=-1, pos_weight=-1,
debug=False), debug=False),
rpn_proposal=dict( rpn_proposal=dict(
nms_across_levels=False, nms_across_levels=False,
nms_pre=2000, nms_pre=2000,
nms_post=1000, nms_post=1000,
max_num=1000, max_num=1000,
nms_thr=0.7, nms_thr=0.7,
min_bbox_size=0), min_bbox_size=0),
rcnn=dict( rcnn=dict(
assigner=dict( assigner=dict(
type='MaxIoUAssigner', type='MaxIoUAssigner',
pos_iou_thr=0.5, pos_iou_thr=0.5,
neg_iou_thr=0.5, neg_iou_thr=0.5,
min_pos_iou=0.5, min_pos_iou=0.5,
match_low_quality=True, match_low_quality=True,
ignore_iof_thr=-1), ignore_iof_thr=-1),
sampler=dict( sampler=dict(
type='RandomSampler', type='RandomSampler',
num=512, num=512,
pos_fraction=0.25, pos_fraction=0.25,
neg_pos_ub=-1, neg_pos_ub=-1,
add_gt_as_proposals=True), add_gt_as_proposals=True),
mask_size=28, mask_size=28,
pos_weight=-1, pos_weight=-1,
debug=False)) debug=False)),
test_cfg = dict( test_cfg=dict(
rpn=dict( rpn=dict(
nms_across_levels=False, nms_across_levels=False,
nms_pre=1000, nms_pre=1000,
nms_post=1000, nms_post=1000,
max_num=1000, max_num=1000,
nms_thr=0.7, nms_thr=0.7,
min_bbox_size=0), min_bbox_size=0),
rcnn=dict( rcnn=dict(
score_thr=0.05, score_thr=0.05,
nms=dict(type='nms', iou_threshold=0.5), nms=dict(type='nms', iou_threshold=0.5),
max_per_img=100, max_per_img=100,
mask_thr_binary=0.5)) mask_thr_binary=0.5)))
...@@ -62,8 +62,12 @@ model = dict( ...@@ -62,8 +62,12 @@ model = dict(
size_res_loss=dict( size_res_loss=dict(
type='SmoothL1Loss', reduction='sum', loss_weight=10.0 / 3.0), type='SmoothL1Loss', reduction='sum', loss_weight=10.0 / 3.0),
semantic_loss=dict( semantic_loss=dict(
type='CrossEntropyLoss', reduction='sum', loss_weight=1.0))) type='CrossEntropyLoss', reduction='sum', loss_weight=1.0)),
# model training and testing settings # model training and testing settings
train_cfg = dict(pos_distance_thr=0.3, neg_distance_thr=0.6, sample_mod='vote') train_cfg=dict(
test_cfg = dict( pos_distance_thr=0.3, neg_distance_thr=0.6, sample_mod='vote'),
sample_mod='seed', nms_thr=0.25, score_thr=0.05, per_class_proposal=True) test_cfg=dict(
sample_mod='seed',
nms_thr=0.25,
score_thr=0.05,
per_class_proposal=True))
...@@ -111,88 +111,94 @@ model = dict( ...@@ -111,88 +111,94 @@ model = dict(
type='CrossEntropyLoss', type='CrossEntropyLoss',
use_sigmoid=True, use_sigmoid=True,
reduction='sum', reduction='sum',
loss_weight=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(
assigner=[ assigner=[
dict( # for Pedestrian dict( # for Pedestrian
type='MaxIoUAssigner', type='MaxIoUAssigner',
iou_calculator=dict(type='BboxOverlapsNearest3D'), iou_calculator=dict(type='BboxOverlapsNearest3D'),
pos_iou_thr=0.5, pos_iou_thr=0.5,
neg_iou_thr=0.35, neg_iou_thr=0.35,
min_pos_iou=0.35, min_pos_iou=0.35,
ignore_iof_thr=-1), ignore_iof_thr=-1),
dict( # for Cyclist dict( # for Cyclist
type='MaxIoUAssigner', type='MaxIoUAssigner',
iou_calculator=dict(type='BboxOverlapsNearest3D'), iou_calculator=dict(type='BboxOverlapsNearest3D'),
pos_iou_thr=0.5, pos_iou_thr=0.5,
neg_iou_thr=0.35, neg_iou_thr=0.35,
min_pos_iou=0.35, min_pos_iou=0.35,
ignore_iof_thr=-1), ignore_iof_thr=-1),
dict( # for Car dict( # for Car
type='MaxIoUAssigner', type='MaxIoUAssigner',
iou_calculator=dict(type='BboxOverlapsNearest3D'), iou_calculator=dict(type='BboxOverlapsNearest3D'),
pos_iou_thr=0.6, pos_iou_thr=0.6,
neg_iou_thr=0.45, neg_iou_thr=0.45,
min_pos_iou=0.45, min_pos_iou=0.45,
ignore_iof_thr=-1) ignore_iof_thr=-1)
], ],
allowed_border=0, allowed_border=0,
pos_weight=-1, pos_weight=-1,
debug=False), debug=False),
rpn_proposal=dict( rpn_proposal=dict(
nms_pre=9000, nms_pre=9000,
nms_post=512, nms_post=512,
max_num=512, max_num=512,
nms_thr=0.8, nms_thr=0.8,
score_thr=0, score_thr=0,
use_rotate_nms=False), use_rotate_nms=False),
rcnn=dict( rcnn=dict(
assigner=[ assigner=[
dict( # for Pedestrian dict( # for Pedestrian
type='MaxIoUAssigner', type='MaxIoUAssigner',
iou_calculator=dict(type='BboxOverlaps3D', coordinate='lidar'), iou_calculator=dict(
pos_iou_thr=0.55, type='BboxOverlaps3D', coordinate='lidar'),
neg_iou_thr=0.55, pos_iou_thr=0.55,
min_pos_iou=0.55, neg_iou_thr=0.55,
ignore_iof_thr=-1), min_pos_iou=0.55,
dict( # for Cyclist ignore_iof_thr=-1),
type='MaxIoUAssigner', dict( # for Cyclist
iou_calculator=dict(type='BboxOverlaps3D', coordinate='lidar'), type='MaxIoUAssigner',
pos_iou_thr=0.55, iou_calculator=dict(
neg_iou_thr=0.55, type='BboxOverlaps3D', coordinate='lidar'),
min_pos_iou=0.55, pos_iou_thr=0.55,
ignore_iof_thr=-1), neg_iou_thr=0.55,
dict( # for Car min_pos_iou=0.55,
type='MaxIoUAssigner', ignore_iof_thr=-1),
iou_calculator=dict(type='BboxOverlaps3D', coordinate='lidar'), dict( # for Car
pos_iou_thr=0.55, type='MaxIoUAssigner',
neg_iou_thr=0.55, iou_calculator=dict(
min_pos_iou=0.55, type='BboxOverlaps3D', coordinate='lidar'),
ignore_iof_thr=-1) pos_iou_thr=0.55,
], neg_iou_thr=0.55,
sampler=dict( min_pos_iou=0.55,
type='IoUNegPiecewiseSampler', ignore_iof_thr=-1)
num=128, ],
pos_fraction=0.55, sampler=dict(
neg_piece_fractions=[0.8, 0.2], type='IoUNegPiecewiseSampler',
neg_iou_piece_thrs=[0.55, 0.1], num=128,
neg_pos_ub=-1, pos_fraction=0.55,
add_gt_as_proposals=False, neg_piece_fractions=[0.8, 0.2],
return_iou=True), neg_iou_piece_thrs=[0.55, 0.1],
cls_pos_thr=0.75, neg_pos_ub=-1,
cls_neg_thr=0.25)) add_gt_as_proposals=False,
test_cfg = dict( return_iou=True),
rpn=dict( cls_pos_thr=0.75,
nms_pre=1024, cls_neg_thr=0.25)),
nms_post=100, test_cfg=dict(
max_num=100, rpn=dict(
nms_thr=0.7, nms_pre=1024,
score_thr=0, nms_post=100,
use_rotate_nms=True), max_num=100,
rcnn=dict( nms_thr=0.7,
use_rotate_nms=True, use_raw_score=True, nms_thr=0.01, score_thr=0.3)) score_thr=0,
use_rotate_nms=True),
rcnn=dict(
use_rotate_nms=True,
use_raw_score=True,
nms_thr=0.01,
score_thr=0.3)))
# dataset settings # dataset settings
dataset_type = 'KittiDataset' dataset_type = 'KittiDataset'
......
...@@ -50,27 +50,27 @@ model = dict( ...@@ -50,27 +50,27 @@ model = dict(
loss_weight=1.0), loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=2.0), loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=2.0),
loss_dir=dict( loss_dir=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.2))) type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.2)),
# model training and testing settings # model training and testing settings
train_cfg = dict( train_cfg=dict(
assigner=dict( assigner=dict(
type='MaxIoUAssigner', type='MaxIoUAssigner',
iou_calculator=dict(type='BboxOverlapsNearest3D'), iou_calculator=dict(type='BboxOverlapsNearest3D'),
pos_iou_thr=0.6, pos_iou_thr=0.6,
neg_iou_thr=0.45, neg_iou_thr=0.45,
min_pos_iou=0.45, min_pos_iou=0.45,
ignore_iof_thr=-1), ignore_iof_thr=-1),
allowed_border=0, allowed_border=0,
pos_weight=-1, pos_weight=-1,
debug=False) debug=False),
test_cfg = dict( test_cfg=dict(
use_rotate_nms=True, use_rotate_nms=True,
nms_across_levels=False, nms_across_levels=False,
nms_thr=0.01, nms_thr=0.01,
score_thr=0.1, score_thr=0.1,
min_bbox_size=0, min_bbox_size=0,
nms_pre=100, nms_pre=100,
max_num=50) max_num=50))
# dataset settings # dataset settings
dataset_type = 'KittiDataset' dataset_type = 'KittiDataset'
......
...@@ -63,43 +63,42 @@ model = dict( ...@@ -63,43 +63,42 @@ model = dict(
loss_dir=dict( loss_dir=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.2), type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.2),
), ),
) # model training and testing settings
# model training and testing settings train_cfg=dict(
train_cfg = dict( assigner=[
assigner=[ dict( # for Pedestrian
dict( # for Pedestrian type='MaxIoUAssigner',
type='MaxIoUAssigner', iou_calculator=dict(type='BboxOverlapsNearest3D'),
iou_calculator=dict(type='BboxOverlapsNearest3D'), pos_iou_thr=0.5,
pos_iou_thr=0.5, neg_iou_thr=0.35,
neg_iou_thr=0.35, min_pos_iou=0.35,
min_pos_iou=0.35, ignore_iof_thr=-1),
ignore_iof_thr=-1), dict( # for Cyclist
dict( # for Cyclist type='MaxIoUAssigner',
type='MaxIoUAssigner', iou_calculator=dict(type='BboxOverlapsNearest3D'),
iou_calculator=dict(type='BboxOverlapsNearest3D'), pos_iou_thr=0.5,
pos_iou_thr=0.5, neg_iou_thr=0.35,
neg_iou_thr=0.35, min_pos_iou=0.35,
min_pos_iou=0.35, ignore_iof_thr=-1),
ignore_iof_thr=-1), dict( # for Car
dict( # for Car type='MaxIoUAssigner',
type='MaxIoUAssigner', iou_calculator=dict(type='BboxOverlapsNearest3D'),
iou_calculator=dict(type='BboxOverlapsNearest3D'), pos_iou_thr=0.6,
pos_iou_thr=0.6, neg_iou_thr=0.45,
neg_iou_thr=0.45, min_pos_iou=0.45,
min_pos_iou=0.45, ignore_iof_thr=-1),
ignore_iof_thr=-1), ],
], allowed_border=0,
allowed_border=0, pos_weight=-1,
pos_weight=-1, debug=False),
debug=False) test_cfg=dict(
test_cfg = dict( use_rotate_nms=True,
use_rotate_nms=True, nms_across_levels=False,
nms_across_levels=False, nms_thr=0.01,
nms_thr=0.01, score_thr=0.1,
score_thr=0.1, min_bbox_size=0,
min_bbox_size=0, nms_pre=100,
nms_pre=100, max_num=50))
max_num=50)
# dataset settings # dataset settings
dataset_type = 'KittiDataset' dataset_type = 'KittiDataset'
......
...@@ -52,43 +52,43 @@ model = dict( ...@@ -52,43 +52,43 @@ model = dict(
loss_weight=1.0), loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=2.0), loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=2.0),
loss_dir=dict( loss_dir=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.2))) type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.2)),
# model training and testing settings # model training and testing settings
train_cfg = dict( train_cfg=dict(
assigner=[ assigner=[
dict( # for Pedestrian dict( # for Pedestrian
type='MaxIoUAssigner', type='MaxIoUAssigner',
iou_calculator=dict(type='BboxOverlapsNearest3D'), iou_calculator=dict(type='BboxOverlapsNearest3D'),
pos_iou_thr=0.5, pos_iou_thr=0.5,
neg_iou_thr=0.35, neg_iou_thr=0.35,
min_pos_iou=0.35, min_pos_iou=0.35,
ignore_iof_thr=-1), ignore_iof_thr=-1),
dict( # for Cyclist dict( # for Cyclist
type='MaxIoUAssigner', type='MaxIoUAssigner',
iou_calculator=dict(type='BboxOverlapsNearest3D'), iou_calculator=dict(type='BboxOverlapsNearest3D'),
pos_iou_thr=0.5, pos_iou_thr=0.5,
neg_iou_thr=0.35, neg_iou_thr=0.35,
min_pos_iou=0.35, min_pos_iou=0.35,
ignore_iof_thr=-1), ignore_iof_thr=-1),
dict( # for Car dict( # for Car
type='MaxIoUAssigner', type='MaxIoUAssigner',
iou_calculator=dict(type='BboxOverlapsNearest3D'), iou_calculator=dict(type='BboxOverlapsNearest3D'),
pos_iou_thr=0.6, pos_iou_thr=0.6,
neg_iou_thr=0.45, neg_iou_thr=0.45,
min_pos_iou=0.45, min_pos_iou=0.45,
ignore_iof_thr=-1), ignore_iof_thr=-1),
], ],
allowed_border=0, allowed_border=0,
pos_weight=-1, pos_weight=-1,
debug=False) debug=False),
test_cfg = dict( test_cfg=dict(
use_rotate_nms=True, use_rotate_nms=True,
nms_across_levels=False, nms_across_levels=False,
nms_thr=0.01, nms_thr=0.01,
score_thr=0.1, score_thr=0.1,
min_bbox_size=0, min_bbox_size=0,
nms_pre=100, nms_pre=100,
max_num=50) max_num=50))
# dataset settings # dataset settings
dataset_type = 'KittiDataset' dataset_type = 'KittiDataset'
......
...@@ -47,10 +47,11 @@ For example, we change `centerpoint_0075voxel_second_secfpn_circlenms_4x8_cyclic ...@@ -47,10 +47,11 @@ For example, we change `centerpoint_0075voxel_second_secfpn_circlenms_4x8_cyclic
_base_ = './centerpoint_0075voxel_second_secfpn_circlenms' \ _base_ = './centerpoint_0075voxel_second_secfpn_circlenms' \
'_4x8_cyclic_20e_nus.py' '_4x8_cyclic_20e_nus.py'
test_cfg = dict( model = dict(
pts=dict( test_cfg=dict(
use_rotate_nms=True, pts=dict(
max_num=83)) use_rotate_nms=True,
max_num=83)))
point_cloud_range = [-54, -54, -5.0, 54, 54, 3.0] point_cloud_range = [-54, -54, -5.0, 54, 54, 3.0]
file_client_args = dict(backend='disk') file_client_args = dict(backend='disk')
......
...@@ -16,16 +16,14 @@ model = dict( ...@@ -16,16 +16,14 @@ model = dict(
pts_middle_encoder=dict(sparse_shape=[41, 1440, 1440]), pts_middle_encoder=dict(sparse_shape=[41, 1440, 1440]),
pts_bbox_head=dict( pts_bbox_head=dict(
bbox_coder=dict( bbox_coder=dict(
voxel_size=voxel_size[:2], pc_range=point_cloud_range[:2]))) voxel_size=voxel_size[:2], pc_range=point_cloud_range[:2])),
train_cfg=dict(
train_cfg = dict( pts=dict(
pts=dict( grid_size=[1440, 1440, 40],
grid_size=[1440, 1440, 40], voxel_size=voxel_size,
voxel_size=voxel_size, point_cloud_range=point_cloud_range)),
point_cloud_range=point_cloud_range)) test_cfg=dict(
pts=dict(voxel_size=voxel_size[:2], pc_range=point_cloud_range[:2])))
test_cfg = dict(
pts=dict(voxel_size=voxel_size[:2], pc_range=point_cloud_range[:2]))
dataset_type = 'NuScenesDataset' dataset_type = 'NuScenesDataset'
data_root = 'data/nuscenes/' data_root = 'data/nuscenes/'
......
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