|
82 | 82 | seg_offset=2**16, |
83 | 83 | dataset_type='semantickitti', |
84 | 84 | backend_args=backend_args), |
85 | | - dict(type='PointSegClassMapping', ), |
| 85 | + dict(type='PointSegClassMapping'), |
86 | 86 | dict( |
87 | 87 | type='RandomFlip3D', |
88 | 88 | sync_2d=False, |
|
112 | 112 | seg_offset=2**16, |
113 | 113 | dataset_type='semantickitti', |
114 | 114 | backend_args=backend_args), |
115 | | - dict(type='PointSegClassMapping', ), |
116 | | - dict(type='Pack3DDetInputs', keys=['points', 'pts_semantic_mask']) |
| 115 | + dict(type='PointSegClassMapping'), |
| 116 | + dict(type='Pack3DDetInputs', keys=['points']) |
117 | 117 | ] |
118 | 118 | # construct a pipeline for data and gt loading in show function |
119 | 119 | # please keep its loading function consistent with test_pipeline (e.g. client) |
120 | 120 | eval_pipeline = [ |
| 121 | + dict( |
| 122 | + type='LoadPointsFromFile', |
| 123 | + coord_type='LIDAR', |
| 124 | + load_dim=4, |
| 125 | + use_dim=4, |
| 126 | + backend_args=backend_args), |
| 127 | + dict(type='Pack3DDetInputs', keys=['points']) |
| 128 | +] |
| 129 | +tta_pipeline = [ |
121 | 130 | dict( |
122 | 131 | type='LoadPointsFromFile', |
123 | 132 | coord_type='LIDAR', |
|
133 | 142 | seg_offset=2**16, |
134 | 143 | dataset_type='semantickitti', |
135 | 144 | backend_args=backend_args), |
136 | | - dict(type='PointSegClassMapping', ), |
137 | | - dict(type='Pack3DDetInputs', keys=['points', 'pts_semantic_mask']) |
| 145 | + dict(type='PointSegClassMapping'), |
| 146 | + dict( |
| 147 | + type='TestTimeAug', |
| 148 | + transforms=[[ |
| 149 | + dict( |
| 150 | + type='RandomFlip3D', |
| 151 | + sync_2d=False, |
| 152 | + flip_ratio_bev_horizontal=0., |
| 153 | + flip_ratio_bev_vertical=0.), |
| 154 | + dict( |
| 155 | + type='RandomFlip3D', |
| 156 | + sync_2d=False, |
| 157 | + flip_ratio_bev_horizontal=0., |
| 158 | + flip_ratio_bev_vertical=1.), |
| 159 | + dict( |
| 160 | + type='RandomFlip3D', |
| 161 | + sync_2d=False, |
| 162 | + flip_ratio_bev_horizontal=1., |
| 163 | + flip_ratio_bev_vertical=0.), |
| 164 | + dict( |
| 165 | + type='RandomFlip3D', |
| 166 | + sync_2d=False, |
| 167 | + flip_ratio_bev_horizontal=1., |
| 168 | + flip_ratio_bev_vertical=1.) |
| 169 | + ], |
| 170 | + [ |
| 171 | + dict( |
| 172 | + type='GlobalRotScaleTrans', |
| 173 | + rot_range=[pcd_rotate_range, pcd_rotate_range], |
| 174 | + scale_ratio_range=[ |
| 175 | + pcd_scale_factor, pcd_scale_factor |
| 176 | + ], |
| 177 | + translation_std=[0, 0, 0]) |
| 178 | + for pcd_rotate_range in [-0.78539816, 0.0, 0.78539816] |
| 179 | + for pcd_scale_factor in [0.95, 1.0, 1.05] |
| 180 | + ], [dict(type='Pack3DDetInputs', keys=['points'])]]) |
138 | 181 | ] |
139 | 182 |
|
140 | 183 | train_dataloader = dict( |
141 | 184 | batch_size=2, |
142 | 185 | num_workers=4, |
| 186 | + persistent_workers=True, |
143 | 187 | sampler=dict(type='DefaultSampler', shuffle=True), |
144 | 188 | dataset=dict( |
145 | | - type='RepeatDataset', |
146 | | - times=1, |
147 | | - dataset=dict( |
148 | | - type=dataset_type, |
149 | | - data_root=data_root, |
150 | | - ann_file='semantickitti_infos_train.pkl', |
151 | | - pipeline=train_pipeline, |
152 | | - metainfo=metainfo, |
153 | | - modality=input_modality, |
154 | | - ignore_index=19, |
155 | | - backend_args=backend_args)), |
156 | | -) |
| 189 | + type=dataset_type, |
| 190 | + data_root=data_root, |
| 191 | + ann_file='semantickitti_infos_train.pkl', |
| 192 | + pipeline=train_pipeline, |
| 193 | + metainfo=metainfo, |
| 194 | + modality=input_modality, |
| 195 | + ignore_index=19, |
| 196 | + backend_args=backend_args)) |
157 | 197 |
|
158 | 198 | test_dataloader = dict( |
159 | 199 | batch_size=1, |
160 | 200 | num_workers=1, |
| 201 | + persistent_workers=True, |
| 202 | + drop_last=False, |
161 | 203 | sampler=dict(type='DefaultSampler', shuffle=False), |
162 | 204 | dataset=dict( |
163 | | - type='RepeatDataset', |
164 | | - times=1, |
165 | | - dataset=dict( |
166 | | - type=dataset_type, |
167 | | - data_root=data_root, |
168 | | - ann_file='semantickitti_infos_val.pkl', |
169 | | - pipeline=test_pipeline, |
170 | | - metainfo=metainfo, |
171 | | - modality=input_modality, |
172 | | - ignore_index=19, |
173 | | - test_mode=True, |
174 | | - backend_args=backend_args)), |
175 | | -) |
| 205 | + type=dataset_type, |
| 206 | + data_root=data_root, |
| 207 | + ann_file='semantickitti_infos_val.pkl', |
| 208 | + pipeline=test_pipeline, |
| 209 | + metainfo=metainfo, |
| 210 | + modality=input_modality, |
| 211 | + ignore_index=19, |
| 212 | + test_mode=True, |
| 213 | + backend_args=backend_args)) |
176 | 214 |
|
177 | 215 | val_dataloader = test_dataloader |
178 | 216 |
|
|
182 | 220 | vis_backends = [dict(type='LocalVisBackend')] |
183 | 221 | visualizer = dict( |
184 | 222 | type='Det3DLocalVisualizer', vis_backends=vis_backends, name='visualizer') |
| 223 | + |
| 224 | +tta_model = dict(type='Seg3DTTAModel') |
0 commit comments