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
_base_ = ['./centerpoint_0075voxel_second_secfpn_4x8_cyclic_20e_nus.py'] _base_ = ['./centerpoint_0075voxel_second_secfpn_4x8_cyclic_20e_nus.py']
test_cfg = dict(pts=dict(nms_type='circle')) model = dict(test_cfg=dict(pts=dict(nms_type='circle')))
...@@ -12,6 +12,5 @@ model = dict( ...@@ -12,6 +12,5 @@ model = dict(
padding=1, padding=1,
groups=4), groups=4),
init_bias=-2.19, init_bias=-2.19,
final_kernel=3))) final_kernel=3)),
test_cfg=dict(pts=dict(nms_type='circle')))
test_cfg = dict(pts=dict(nms_type='circle'))
...@@ -15,10 +15,10 @@ class_names = [ ...@@ -15,10 +15,10 @@ class_names = [
model = dict( model = dict(
pts_voxel_layer=dict(point_cloud_range=point_cloud_range), pts_voxel_layer=dict(point_cloud_range=point_cloud_range),
pts_bbox_head=dict(bbox_coder=dict(pc_range=point_cloud_range[:2]))) pts_bbox_head=dict(bbox_coder=dict(pc_range=point_cloud_range[:2])),
# model training and testing settings # model training and testing settings
train_cfg = dict(pts=dict(point_cloud_range=point_cloud_range)) train_cfg=dict(pts=dict(point_cloud_range=point_cloud_range)),
test_cfg = dict(pts=dict(pc_range=point_cloud_range[:2])) test_cfg=dict(pts=dict(pc_range=point_cloud_range[:2])))
dataset_type = 'NuScenesDataset' dataset_type = 'NuScenesDataset'
data_root = 'data/nuscenes/' data_root = 'data/nuscenes/'
......
_base_ = ['./centerpoint_01voxel_second_secfpn_4x8_cyclic_20e_nus.py'] _base_ = ['./centerpoint_01voxel_second_secfpn_4x8_cyclic_20e_nus.py']
test_cfg = dict(pts=dict(nms_type='circle')) model = dict(test_cfg=dict(pts=dict(nms_type='circle')))
...@@ -12,6 +12,5 @@ model = dict( ...@@ -12,6 +12,5 @@ model = dict(
padding=1, padding=1,
groups=4), groups=4),
init_bias=-2.19, init_bias=-2.19,
final_kernel=3))) final_kernel=3)),
test_cfg=dict(pts=dict(nms_type='circle')))
test_cfg = dict(pts=dict(nms_type='circle'))
...@@ -16,10 +16,10 @@ class_names = [ ...@@ -16,10 +16,10 @@ class_names = [
model = dict( model = dict(
pts_voxel_layer=dict(point_cloud_range=point_cloud_range), pts_voxel_layer=dict(point_cloud_range=point_cloud_range),
pts_voxel_encoder=dict(point_cloud_range=point_cloud_range), pts_voxel_encoder=dict(point_cloud_range=point_cloud_range),
pts_bbox_head=dict(bbox_coder=dict(pc_range=point_cloud_range[:2]))) pts_bbox_head=dict(bbox_coder=dict(pc_range=point_cloud_range[:2])),
# model training and testing settings # model training and testing settings
train_cfg = dict(pts=dict(point_cloud_range=point_cloud_range)) train_cfg=dict(pts=dict(point_cloud_range=point_cloud_range)),
test_cfg = dict(pts=dict(pc_range=point_cloud_range[:2])) test_cfg=dict(pts=dict(pc_range=point_cloud_range[:2])))
dataset_type = 'NuScenesDataset' dataset_type = 'NuScenesDataset'
data_root = 'data/nuscenes/' data_root = 'data/nuscenes/'
......
_base_ = ['./centerpoint_02pillar_second_secfpn_4x8_cyclic_20e_nus.py'] _base_ = ['./centerpoint_02pillar_second_secfpn_4x8_cyclic_20e_nus.py']
test_cfg = dict(pts=dict(nms_type='circle')) model = dict(test_cfg=dict(pts=dict(nms_type='circle')))
...@@ -12,6 +12,5 @@ model = dict( ...@@ -12,6 +12,5 @@ model = dict(
padding=1, padding=1,
groups=4), groups=4),
init_bias=-2.19, init_bias=-2.19,
final_kernel=3))) final_kernel=3)),
test_cfg=dict(pts=dict(nms_type='circle')))
test_cfg = dict(pts=dict(nms_type='circle'))
...@@ -70,10 +70,10 @@ model = dict( ...@@ -70,10 +70,10 @@ model = dict(
loss_weight=1.0), loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=0.8), loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=0.8),
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(code_weight=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.25, 0.25])) pts=dict(code_weight=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.25, 0.25])))
``` ```
## Results ## Results
......
...@@ -42,7 +42,7 @@ model = dict( ...@@ -42,7 +42,7 @@ model = dict(
loss_weight=1.0), loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=0.8), loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=0.8),
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(code_weight=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.25, 0.25])) pts=dict(code_weight=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.25, 0.25])))
...@@ -87,45 +87,45 @@ model = dict( ...@@ -87,45 +87,45 @@ 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(
pts=dict( pts=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(
pts=dict( pts=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'
......
...@@ -130,92 +130,92 @@ model = dict( ...@@ -130,92 +130,92 @@ model = dict(
num_classes=10, num_classes=10,
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,
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,
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,
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,
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.001, 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,
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,
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,
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.001,
nms=dict(type='nms', iou_threshold=0.5),
max_per_img=100,
mask_thr_binary=0.5)))
...@@ -112,88 +112,94 @@ model = dict( ...@@ -112,88 +112,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.1)) score_thr=0,
use_rotate_nms=True),
rcnn=dict(
use_rotate_nms=True,
use_raw_score=True,
nms_thr=0.01,
score_thr=0.1)))
# dataset settings # dataset settings
dataset_type = 'KittiDataset' dataset_type = 'KittiDataset'
......
...@@ -17,57 +17,60 @@ model = dict( ...@@ -17,57 +17,60 @@ model = dict(
roi_head=dict( roi_head=dict(
num_classes=1, num_classes=1,
semantic_head=dict(num_classes=1), semantic_head=dict(num_classes=1),
bbox_head=dict(num_classes=1))) bbox_head=dict(num_classes=1)),
# model training and testing settings # model training and testing settings
train_cfg = dict( train_cfg=dict(
_delete_=True, _delete_=True,
rpn=dict( rpn=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),
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=dict( # for Car assigner=dict( # for Car
type='MaxIoUAssigner', type='MaxIoUAssigner',
iou_calculator=dict(type='BboxOverlaps3D', coordinate='lidar'), iou_calculator=dict(type='BboxOverlaps3D', coordinate='lidar'),
pos_iou_thr=0.55, pos_iou_thr=0.55,
neg_iou_thr=0.55, neg_iou_thr=0.55,
min_pos_iou=0.55, min_pos_iou=0.55,
ignore_iof_thr=-1), ignore_iof_thr=-1),
sampler=dict( sampler=dict(
type='IoUNegPiecewiseSampler', type='IoUNegPiecewiseSampler',
num=128, num=128,
pos_fraction=0.55, pos_fraction=0.55,
neg_piece_fractions=[0.8, 0.2], neg_piece_fractions=[0.8, 0.2],
neg_iou_piece_thrs=[0.55, 0.1], neg_iou_piece_thrs=[0.55, 0.1],
neg_pos_ub=-1, neg_pos_ub=-1,
add_gt_as_proposals=False, add_gt_as_proposals=False,
return_iou=True), return_iou=True),
cls_pos_thr=0.75, cls_pos_thr=0.75,
cls_neg_thr=0.25)) cls_neg_thr=0.25)),
test_cfg = dict( test_cfg=dict(
rpn=dict( rpn=dict(
nms_pre=1024, nms_pre=1024,
nms_post=100, nms_post=100,
max_num=100, max_num=100,
nms_thr=0.7, nms_thr=0.7,
score_thr=0, score_thr=0,
use_rotate_nms=True), use_rotate_nms=True),
rcnn=dict( rcnn=dict(
use_rotate_nms=True, use_raw_score=True, nms_thr=0.01, score_thr=0.1)) use_rotate_nms=True,
use_raw_score=True,
nms_thr=0.01,
score_thr=0.1)))
# dataset settings # dataset settings
dataset_type = 'KittiDataset' dataset_type = 'KittiDataset'
......
...@@ -12,20 +12,20 @@ model = dict( ...@@ -12,20 +12,20 @@ model = dict(
ranges=[[0, -39.68, -1.78, 69.12, 39.68, -1.78]], ranges=[[0, -39.68, -1.78, 69.12, 39.68, -1.78]],
sizes=[[1.6, 3.9, 1.56]], sizes=[[1.6, 3.9, 1.56]],
rotations=[0, 1.57], rotations=[0, 1.57],
reshape_out=True))) reshape_out=True)),
# model training and testing settings # model training and testing settings
train_cfg = dict( train_cfg=dict(
_delete_=True, _delete_=True,
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))
# dataset settings # dataset settings
dataset_type = 'KittiDataset' dataset_type = 'KittiDataset'
......
...@@ -19,20 +19,19 @@ model = dict( ...@@ -19,20 +19,19 @@ model = dict(
ranges=[[-74.88, -74.88, -0.0345, 74.88, 74.88, -0.0345]], ranges=[[-74.88, -74.88, -0.0345, 74.88, 74.88, -0.0345]],
sizes=[[2.08, 4.73, 1.77]], sizes=[[2.08, 4.73, 1.77]],
rotations=[0, 1.57], rotations=[0, 1.57],
reshape_out=True))) reshape_out=True)),
# model training and testing settings
# model training and testing settings train_cfg=dict(
train_cfg = dict( _delete_=True,
_delete_=True, 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.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), 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))
...@@ -16,20 +16,19 @@ model = dict( ...@@ -16,20 +16,19 @@ model = dict(
ranges=[[-74.88, -74.88, -0.0345, 74.88, 74.88, -0.0345]], ranges=[[-74.88, -74.88, -0.0345, 74.88, 74.88, -0.0345]],
sizes=[[2.08, 4.73, 1.77]], sizes=[[2.08, 4.73, 1.77]],
rotations=[0, 1.57], rotations=[0, 1.57],
reshape_out=True))) reshape_out=True)),
# model training and testing settings
# model training and testing settings train_cfg=dict(
train_cfg = dict( _delete_=True,
_delete_=True, 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.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), 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))
...@@ -14,17 +14,17 @@ model = dict( ...@@ -14,17 +14,17 @@ model = dict(
ranges=[[0, -40.0, -1.78, 70.4, 40.0, -1.78]], ranges=[[0, -40.0, -1.78, 70.4, 40.0, -1.78]],
sizes=[[1.6, 3.9, 1.56]], sizes=[[1.6, 3.9, 1.56]],
rotations=[0, 1.57], rotations=[0, 1.57],
reshape_out=True))) reshape_out=True)),
# model training and testing settings # model training and testing settings
train_cfg = dict( train_cfg=dict(
_delete_=True, _delete_=True,
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))
...@@ -155,85 +155,84 @@ model = dict( ...@@ -155,85 +155,84 @@ 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( _delete_=True,
_delete_=True, pts=dict(
pts=dict( assigner=[
assigner=[ dict( # bicycle
dict( # bicycle 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( # motorcycle
dict( # motorcycle 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.6,
pos_iou_thr=0.6, 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( # traffic cone
dict( # traffic cone 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.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( # barrier
dict( # barrier 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( # car
dict( # 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), dict( # truck
dict( # truck 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( # trailer
dict( # trailer 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( # bus
dict( # bus 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( # construction vehicle
dict( # construction vehicle 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) ],
], 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))
...@@ -44,6 +44,32 @@ For `1x`/`2x`, initial learning rate decays by a factor of 10 at the 8/16th and ...@@ -44,6 +44,32 @@ For `1x`/`2x`, initial learning rate decays by a factor of 10 at the 8/16th and
For `20e`, initial learning rate decays by a factor of 10 at the 16th and 19th epochs. For `20e`, initial learning rate decays by a factor of 10 at the 16th and 19th epochs.
- `{dataset}`: dataset like `nus-3d`, `kitti-3d`, `lyft-3d`, `scannet-3d`, `sunrgbd-3d`. We also indicate the number of classes we are using if there exist multiple settings, e.g., `kitti-3d-3class` and `kitti-3d-car` means training on KITTI dataset with 3 classes and single class, respectively. - `{dataset}`: dataset like `nus-3d`, `kitti-3d`, `lyft-3d`, `scannet-3d`, `sunrgbd-3d`. We also indicate the number of classes we are using if there exist multiple settings, e.g., `kitti-3d-3class` and `kitti-3d-car` means training on KITTI dataset with 3 classes and single class, respectively.
## Deprecated train_cfg/test_cfg
Following MMDetection, the `train_cfg` and `test_cfg` are deprecated in config file, please specify them in the model config. The original config structure is as below.
```python
# deprecated
model = dict(
type=...,
...
)
train_cfg=dict(...)
test_cfg=dict(...)
```
The migration example is as below.
```python
# recommended
model = dict(
type=...,
...
train_cfg=dict(...),
test_cfg=dict(...)
)
```
## An example of VoteNet ## An example of VoteNet
```python ```python
...@@ -144,16 +170,16 @@ model = dict( ...@@ -144,16 +170,16 @@ model = dict(
semantic_loss=dict( # Config to semantic loss semantic_loss=dict( # Config to semantic loss
type='CrossEntropyLoss', # Type of loss type='CrossEntropyLoss', # Type of loss
reduction='sum', # Specifies the reduction to apply to the output reduction='sum', # Specifies the reduction to apply to the output
loss_weight=1.0))) # Loss weight of the semantic loss loss_weight=1.0)), # Loss weight of the semantic loss
train_cfg = dict( # Config of training hyperparameters for votenet train_cfg = dict( # Config of training hyperparameters for votenet
pos_distance_thr=0.3, # distance >= threshold 0.3 will be taken as positive samples pos_distance_thr=0.3, # distance >= threshold 0.3 will be taken as positive samples
neg_distance_thr=0.6, # distance < threshold 0.6 will be taken as positive samples neg_distance_thr=0.6, # distance < threshold 0.6 will be taken as positive samples
sample_mod='vote') # Mode of the sampling method sample_mod='vote'), # Mode of the sampling method
test_cfg = dict( # Config of testing hyperparameters for votenet test_cfg = dict( # Config of testing hyperparameters for votenet
sample_mod='seed', # Mode of the sampling method sample_mod='seed', # Mode of the sampling method
nms_thr=0.25, # The threshold to be used during NMS nms_thr=0.25, # The threshold to be used during NMS
score_thr=0.8, # Threshold to filter out boxes score_thr=0.8, # Threshold to filter out boxes
per_class_proposal=False) # Whether to use per_class_proposal per_class_proposal=False)) # Whether to use per_class_proposal
dataset_type = 'ScanNetDataset' # Type of the dataset dataset_type = 'ScanNetDataset' # Type of the dataset
data_root = './data/scannet/' # Root path of the data data_root = './data/scannet/' # Root path of the data
class_names = ('cabinet', 'bed', 'chair', 'sofa', 'table', 'door', 'window', class_names = ('cabinet', 'bed', 'chair', 'sofa', 'table', 'door', 'window',
......
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