-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathnuscenes_c.py
60 lines (54 loc) · 1.97 KB
/
nuscenes_c.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
img_norm_cfg = dict(
mean=[103.530, 116.280, 123.675], std=[1.0, 1.0, 1.0], to_rgb=False)
# For nuScenes we usually do 10-class detection
class_names = [
'car', 'truck', 'construction_vehicle', 'bus', 'trailer', 'barrier',
'motorcycle', 'bicycle', 'pedestrian', 'traffic_cone'
]
plugin_dir = 'projects/mmdet3d_plugin/'
input_modality = dict(
use_lidar=False,
use_camera=True,
use_radar=False,
use_map=False,
use_external=True)
dataset_type = 'CustomNuScenesDataset'
data_root = './nuScenes/'
anno_root = './nuScenes/'
corruption_root = './nuScenes-C/'
file_client_args = dict(backend='disk')
test_pipeline = [
dict(type='LoadMultiViewImageFromFiles', to_float32=True),
dict(type='NormalizeMultiviewImage', **img_norm_cfg),
# dict(type='PadMultiViewImage', size_divisor=32),
dict(
type='MultiScaleFlipAug3D',
img_scale=(1600, 900),
pts_scale_ratio=1,
flip=False,
transforms=[
dict(
type='DefaultFormatBundle3D',
class_names=class_names,
with_label=False),
dict(type='CustomCollect3D', keys=['img'])
])
]
data = dict(
samples_per_gpu=1,
workers_per_gpu=16,
val=dict(type=dataset_type,
data_root=data_root,
ann_file=anno_root + 'nuscenes_infos_temporal_val.pkl',
pipeline=test_pipeline,
classes=class_names, modality=input_modality),
shuffler_sampler=dict(type='DistributedGroupSampler')
)
corruptions = [dict(type='CameraCrash', easy=2, mid=4, hard=5),
dict(type='FrameLost', easy=2, mid=4, hard=5),
dict(type='MotionBlur', easy=2, mid=4, hard=5),
dict(type='ColorQuant', easy=1, mid=2, hard=3),
dict(type='Brightness', easy=2, mid=4, hard=5),
dict(type='LowLight', easy=2, mid=3, hard=4),
dict(type='Fog', easy=2, mid=4, hard=5),
dict(type='Snow', easy=1, mid=2, hard=3)]