fcos3d_r101-caffe-dcn_fpn_head-gn_8xb2-1x_nus-mono3d.py 2.39 KB
Newer Older
twang's avatar
twang committed
1
2
_base_ = [
    '../_base_/datasets/nus-mono3d.py', '../_base_/models/fcos3d.py',
3
    '../_base_/schedules/mmdet-schedule-1x.py', '../_base_/default_runtime.py'
twang's avatar
twang committed
4
5
6
]
# model settings
model = dict(
ZCMax's avatar
ZCMax committed
7
8
9
10
11
12
    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),
twang's avatar
twang committed
13
14
15
16
    backbone=dict(
        dcn=dict(type='DCNv2', deform_groups=1, fallback_on_stride=False),
        stage_with_dcn=(False, False, True, True)))

17
file_client_args = dict(backend='disk')
ZCMax's avatar
ZCMax committed
18
19
20
# 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.
21
22
23
24
25
26
27
28
# file_client_args = dict(
#     backend='petrel',
#     path_mapping=dict({
#         './data/nuscenes/':
#         's3://openmmlab/datasets/detection3d/nuscenes/',
#         'data/nuscenes/':
#         's3://openmmlab/datasets/detection3d/nuscenes/'
#     }))
ZCMax's avatar
ZCMax committed
29

twang's avatar
twang committed
30
train_pipeline = [
31
    dict(type='LoadImageFromFileMono3D'),
twang's avatar
twang committed
32
33
34
35
36
37
38
39
    dict(
        type='LoadAnnotations3D',
        with_bbox=True,
        with_label=True,
        with_attr_label=True,
        with_bbox_3d=True,
        with_label_3d=True,
        with_bbox_depth=True),
ZCMax's avatar
ZCMax committed
40
    dict(type='mmdet.Resize', scale=(1600, 900), keep_ratio=True),
twang's avatar
twang committed
41
42
    dict(type='RandomFlip3D', flip_ratio_bev_horizontal=0.5),
    dict(
ZCMax's avatar
ZCMax committed
43
        type='Pack3DDetInputs',
twang's avatar
twang committed
44
        keys=[
45
46
            'img', 'gt_bboxes', 'gt_bboxes_labels', 'attr_labels',
            'gt_bboxes_3d', 'gt_labels_3d', 'centers_2d', 'depths'
twang's avatar
twang committed
47
48
49
        ]),
]
test_pipeline = [
50
    dict(type='LoadImageFromFileMono3D'),
ZCMax's avatar
ZCMax committed
51
52
    dict(type='mmdet.Resize', scale_factor=1.0),
    dict(type='Pack3DDetInputs', keys=['img'])
twang's avatar
twang committed
53
]
ZCMax's avatar
ZCMax committed
54
55

train_dataloader = dict(
ChaimZhu's avatar
ChaimZhu committed
56
    batch_size=2, num_workers=2, dataset=dict(pipeline=train_pipeline))
ZCMax's avatar
ZCMax committed
57
58
59
test_dataloader = dict(dataset=dict(pipeline=test_pipeline))
val_dataloader = dict(dataset=dict(pipeline=test_pipeline))

twang's avatar
twang committed
60
# optimizer
ZCMax's avatar
ZCMax committed
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
optim_wrapper = dict(
    optimizer=dict(lr=0.002),
    paramwise_cfg=dict(bias_lr_mult=2., bias_decay_mult=0.),
    clip_grad=dict(max_norm=35, norm_type=2))

# learning rate
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)
]