|
8 | 8 | ]
|
9 | 9 | dataset_type = 'LyftDataset'
|
10 | 10 | data_root = 'data/lyft/'
|
| 11 | +data_prefix = dict(pts='v1.01-train/lidar', img='', sweeps='v1.01-train/lidar') |
11 | 12 | # Input modality for Lyft dataset, this is consistent with the submission
|
12 | 13 | # format which requires the information in input_modality.
|
13 | 14 | input_modality = dict(
|
|
101 | 102 | dict(type='Pack3DDetInputs', keys=['points'])
|
102 | 103 | ]
|
103 | 104 |
|
104 |
| -data = dict( |
105 |
| - samples_per_gpu=2, |
106 |
| - workers_per_gpu=2, |
107 |
| - train=dict( |
| 105 | +train_dataloader = dict( |
| 106 | + batch_size=2, |
| 107 | + num_workers=2, |
| 108 | + persistent_workers=True, |
| 109 | + sampler=dict(type='DefaultSampler', shuffle=True), |
| 110 | + dataset=dict( |
108 | 111 | type=dataset_type,
|
109 | 112 | data_root=data_root,
|
110 |
| - ann_file=data_root + 'lyft_infos_train.pkl', |
| 113 | + ann_file='lyft_infos_train.pkl', |
111 | 114 | pipeline=train_pipeline,
|
112 |
| - classes=class_names, |
| 115 | + metainfo=dict(classes=class_names), |
113 | 116 | modality=input_modality,
|
114 |
| - test_mode=False), |
115 |
| - val=dict( |
| 117 | + data_prefix=data_prefix, |
| 118 | + test_mode=False, |
| 119 | + box_type_3d='LiDAR', |
| 120 | + backend_args=backend_args)) |
| 121 | +val_dataloader = dict( |
| 122 | + batch_size=1, |
| 123 | + num_workers=1, |
| 124 | + persistent_workers=True, |
| 125 | + drop_last=False, |
| 126 | + sampler=dict(type='DefaultSampler', shuffle=False), |
| 127 | + dataset=dict( |
116 | 128 | type=dataset_type,
|
117 | 129 | data_root=data_root,
|
118 |
| - ann_file=data_root + 'lyft_infos_val.pkl', |
| 130 | + ann_file='lyft_infos_val.pkl', |
119 | 131 | pipeline=test_pipeline,
|
120 |
| - classes=class_names, |
| 132 | + metainfo=dict(classes=class_names), |
121 | 133 | modality=input_modality,
|
122 |
| - test_mode=True), |
123 |
| - test=dict( |
124 |
| - type=dataset_type, |
125 |
| - data_root=data_root, |
126 |
| - ann_file=data_root + 'lyft_infos_test.pkl', |
127 |
| - pipeline=test_pipeline, |
128 |
| - classes=class_names, |
129 |
| - modality=input_modality, |
130 |
| - test_mode=True)) |
131 |
| -# For Lyft dataset, we usually evaluate the model at the end of training. |
132 |
| -# Since the models are trained by 24 epochs by default, we set evaluation |
133 |
| -# interval to be 24. Please change the interval accordingly if you do not |
134 |
| -# use a default schedule. |
135 |
| -evaluation = dict(interval=24, pipeline=eval_pipeline) |
| 134 | + test_mode=True, |
| 135 | + data_prefix=data_prefix, |
| 136 | + box_type_3d='LiDAR', |
| 137 | + backend_args=backend_args)) |
| 138 | +test_dataloader = val_dataloader |
| 139 | + |
| 140 | +val_evaluator = dict( |
| 141 | + type='LyftMetric', |
| 142 | + data_root=data_root, |
| 143 | + ann_file='lyft_infos_val.pkl', |
| 144 | + metric='bbox', |
| 145 | + backend_args=backend_args) |
| 146 | +test_evaluator = val_evaluator |
| 147 | + |
| 148 | +vis_backends = [dict(type='LocalVisBackend')] |
| 149 | +visualizer = dict( |
| 150 | + type='Det3DLocalVisualizer', vis_backends=vis_backends, name='visualizer') |
0 commit comments