Unverified Commit bd1525ec authored by ChaimZhu's avatar ChaimZhu Committed by GitHub
Browse files

[Fix] fix fcos3d and pgd configs (#2191)

* fix configs

* change auto_scale_lr
parent 952a5923
......@@ -4,5 +4,5 @@ model = dict(
train_cfg=dict(
code_weight=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.05, 0.05]))
# optimizer
optimizer = dict(lr=0.001)
optim_wrapper = dict(optimizer=dict(lr=0.001))
load_from = 'work_dirs/fcos3d_nus/latest.pth'
......@@ -4,6 +4,12 @@ _base_ = [
]
# model settings
model = dict(
data_preprocessor=dict(
type='Det3DDataPreprocessor',
mean=[103.530, 116.280, 123.675],
std=[1.0, 1.0, 1.0],
bgr_to_rgb=False,
pad_size_divisor=32),
backbone=dict(
dcn=dict(type='DCNv2', deform_groups=1, fallback_on_stride=False),
stage_with_dcn=(False, False, True, True)),
......@@ -40,10 +46,6 @@ model = dict(
]),
test_cfg=dict(nms_pre=1000, nms_thr=0.8, score_thr=0.01, max_per_img=200))
class_names = [
'car', 'truck', 'trailer', 'bus', 'construction_vehicle', 'bicycle',
'motorcycle', 'pedestrian', 'traffic_cone', 'barrier'
]
train_pipeline = [
dict(type='LoadImageFromFileMono3D'),
dict(
......@@ -54,7 +56,7 @@ train_pipeline = [
with_bbox_3d=True,
with_label_3d=True,
with_bbox_depth=True),
dict(type='Resize', img_scale=(1600, 900), keep_ratio=True),
dict(type='mmdet.Resize', scale=(1600, 900), keep_ratio=True),
dict(type='RandomFlip3D', flip_ratio_bev_horizontal=0.5),
dict(
type='Pack3DDetInputs',
......@@ -65,33 +67,36 @@ train_pipeline = [
]
test_pipeline = [
dict(type='LoadImageFromFileMono3D'),
dict(
type='MultiScaleFlipAug',
scale_factor=1.0,
flip=False,
transforms=[
dict(type='RandomFlip3D'),
]),
dict(type='mmdet.Resize', scale_factor=1.0),
dict(type='Pack3DDetInputs', keys=['img']),
]
data = dict(
samples_per_gpu=2,
workers_per_gpu=2,
train=dict(pipeline=train_pipeline),
val=dict(pipeline=test_pipeline),
test=dict(pipeline=test_pipeline))
train_dataloader = dict(
batch_size=2, num_workers=2, dataset=dict(pipeline=train_pipeline))
test_dataloader = dict(dataset=dict(pipeline=test_pipeline))
val_dataloader = dict(dataset=dict(pipeline=test_pipeline))
# optimizer
optimizer = dict(
lr=0.004, paramwise_cfg=dict(bias_lr_mult=2., bias_decay_mult=0.))
optimizer_config = dict(
_delete_=True, grad_clip=dict(max_norm=35, norm_type=2))
optim_wrapper = dict(
optimizer=dict(lr=0.004),
paramwise_cfg=dict(bias_lr_mult=2., bias_decay_mult=0.),
clip_grad=dict(max_norm=35, norm_type=2))
# learning policy
lr_config = dict(
policy='step',
warmup='linear',
warmup_iters=500,
warmup_ratio=1.0 / 3,
step=[8, 11])
total_epochs = 12
evaluation = dict(interval=4)
runner = dict(max_epochs=total_epochs)
param_scheduler = [
dict(
type='LinearLR',
start_factor=1.0 / 3,
by_epoch=False,
begin=0,
end=500),
dict(
type='MultiStepLR',
begin=0,
end=12,
by_epoch=True,
milestones=[8, 11],
gamma=0.1)
]
train_cfg = dict(max_epochs=12, val_interval=4)
auto_scale_lr = dict(base_batch_size=32)
......@@ -5,5 +5,5 @@ model = dict(
1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.05, 0.05, 0.2, 0.2, 0.2, 0.2
]))
# optimizer
optimizer = dict(lr=0.002)
optim_wrapper = dict(optimizer=dict(lr=0.002))
load_from = 'work_dirs/pgd_nus_benchmark_1x/latest.pth'
_base_ = './pgd_r101-caffe_fpn_head-gn_16xb2-1x_nus-mono3d.py'
# learning policy
lr_config = dict(step=[16, 22])
total_epochs = 24
runner = dict(max_epochs=total_epochs)
param_scheduler = [
dict(
type='LinearLR',
start_factor=1.0 / 3,
by_epoch=False,
begin=0,
end=500),
dict(
type='MultiStepLR',
begin=0,
end=24,
by_epoch=True,
milestones=[16, 22],
gamma=0.1)
]
train_cfg = dict(max_epochs=24)
......@@ -5,5 +5,5 @@ model = dict(
1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.05, 0.05, 0.2, 0.2, 0.2, 0.2
]))
# optimizer
optimizer = dict(lr=0.002)
optim_wrapper = dict(optimizer=dict(lr=0.002))
load_from = 'work_dirs/pgd_nus_benchmark_2x/latest.pth'
......@@ -68,18 +68,18 @@ model = dict(
]),
test_cfg=dict(nms_pre=100, nms_thr=0.05, score_thr=0.001, max_per_img=20))
# file_client_args = dict(backend='disk')
file_client_args = dict(backend='disk')
# Uncomment the following if use ceph or other file clients.
# See https://mmcv.readthedocs.io/en/latest/api.html#mmcv.fileio.FileClient
# for more details.
file_client_args = dict(
backend='petrel',
path_mapping=dict({
'./data/kitti/':
's3://openmmlab/datasets/detection3d/kitti/',
'data/kitti/':
's3://openmmlab/datasets/detection3d/kitti/'
}))
# file_client_args = dict(
# backend='petrel',
# path_mapping=dict({
# './data/kitti/':
# 's3://openmmlab/datasets/detection3d/kitti/',
# 'data/kitti/':
# 's3://openmmlab/datasets/detection3d/kitti/'
# }))
train_pipeline = [
dict(type='LoadImageFromFileMono3D'),
......@@ -135,3 +135,4 @@ param_scheduler = [
]
train_cfg = dict(max_epochs=48, val_interval=2)
auto_scale_lr = dict(base_batch_size=12)
......@@ -105,8 +105,8 @@ param_scheduler = [
milestones=[16, 22],
gamma=0.1)
]
total_epochs = 24
runner = dict(max_epochs=total_epochs)
train_cfg = dict(type='EpochBasedTrainLoop', max_epochs=24, val_interval=24)
val_cfg = dict(type='ValLoop')
test_cfg = dict(type='TestLoop')
auto_scale_lr = dict(base_batch_size=48)
......@@ -104,8 +104,8 @@ param_scheduler = [
milestones=[16, 22],
gamma=0.1)
]
total_epochs = 24
runner = dict(max_epochs=total_epochs)
train_cfg = dict(type='EpochBasedTrainLoop', max_epochs=24, val_interval=24)
val_cfg = dict(type='ValLoop')
test_cfg = dict(type='TestLoop')
auto_scale_lr = dict(base_batch_size=48)
......@@ -105,8 +105,8 @@ param_scheduler = [
milestones=[16, 22],
gamma=0.1)
]
total_epochs = 24
runner = dict(max_epochs=total_epochs)
train_cfg = dict(type='EpochBasedTrainLoop', max_epochs=24, val_interval=24)
val_cfg = dict(type='ValLoop')
test_cfg = dict(type='TestLoop')
auto_scale_lr = dict(base_batch_size=48)
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