Skip to content

Commit 937e7f8

Browse files
authored
fix data loading, formating bugs and dataset path (#1913)
1 parent fc679dc commit 937e7f8

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

configs/_base_/datasets/waymoD5-3d-3class.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@
8888
type=dataset_type,
8989
data_root=data_root,
9090
ann_file='waymo_infos_train.pkl',
91-
data_prefix=dict(pts='training/velodyne'),
91+
data_prefix=dict(
92+
pts='training/velodyne', sweeps='training/velodyne'),
9293
pipeline=train_pipeline,
9394
modality=input_modality,
9495
test_mode=False,
@@ -107,7 +108,7 @@
107108
dataset=dict(
108109
type=dataset_type,
109110
data_root=data_root,
110-
data_prefix=dict(pts='training/velodyne'),
111+
data_prefix=dict(pts='training/velodyne', sweeps='training/velodyne'),
111112
ann_file='waymo_infos_val.pkl',
112113
pipeline=eval_pipeline,
113114
modality=input_modality,
@@ -124,7 +125,7 @@
124125
dataset=dict(
125126
type=dataset_type,
126127
data_root=data_root,
127-
data_prefix=dict(pts='training/velodyne'),
128+
data_prefix=dict(pts='training/velodyne', sweeps='training/velodyne'),
128129
ann_file='waymo_infos_val.pkl',
129130
pipeline=eval_pipeline,
130131
modality=input_modality,

mmdet3d/datasets/transforms/formating.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ class Pack3DDetInputs(BaseTransform):
6363

6464
def __init__(
6565
self,
66+
keys: tuple,
6667
meta_keys: tuple = ('img_path', 'ori_shape', 'img_shape', 'lidar2img',
6768
'depth2img', 'cam2img', 'pad_shape',
6869
'scale_factor', 'flip', 'pcd_horizontal_flip',
@@ -74,7 +75,8 @@ def __init__(
7475
'affine_aug', 'sweep_img_metas', 'ori_cam2img',
7576
'cam2global', 'crop_offset', 'img_crop_offset',
7677
'resize_img_shape', 'lidar2cam', 'ori_lidar2img',
77-
'num_ref_frames', 'num_views', 'ego2global')) -> None:
78+
'num_ref_frames', 'num_views', 'ego2global')
79+
) -> None:
7880
self.keys = keys
7981
self.meta_keys = meta_keys
8082

mmdet3d/datasets/transforms/loading.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def transform(self, results: dict) -> Optional[dict]:
165165
results['ori_cam2img'] = copy.deepcopy(results['cam2img'])
166166

167167
if self.file_client is None:
168-
self.file_client = mmcv.FileClient(**self.file_client_args)
168+
self.file_client = mmengine.FileClient(**self.file_client_args)
169169

170170
# img is of shape (h, w, c, num_views)
171171
# h and w can be different for different views

mmdet3d/datasets/transforms/transforms_3d.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2245,7 +2245,7 @@ def transform(self, results: dict) -> dict:
22452245

22462246

22472247
@TRANSFORMS.register_module()
2248-
class MultiViewWrapper(object):
2248+
class MultiViewWrapper(BaseTransform):
22492249
"""Wrap transformation from single-view into multi-view.
22502250
22512251
The wrapper processes the images from multi-view one by one. For each
@@ -2290,7 +2290,7 @@ def __init__(self,
22902290
'scale', 'scale_factor', 'crop_size', 'img_crop_offset',
22912291
'flip', 'flip_direction', 'photometric_param'
22922292
]):
2293-
self.transform = Compose(transforms)
2293+
self.transforms = Compose(transforms)
22942294
self.override_aug_config = override_aug_config
22952295
self.collected_keys = collected_keys
22962296
self.process_fields = process_fields
@@ -2325,7 +2325,7 @@ def transform(self, input_dict):
23252325
for key in self.process_fields:
23262326
if key in input_dict:
23272327
process_dict[key] = input_dict[key][img_id]
2328-
process_dict = self.transform(process_dict)
2328+
process_dict = self.transforms(process_dict)
23292329
# store the randomness variable in transformation.
23302330
prev_process_dict = process_dict
23312331

0 commit comments

Comments
 (0)