Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
mmdetection3d
Commits
31faf9fc
Unverified
Commit
31faf9fc
authored
Aug 26, 2022
by
VVsssssk
Committed by
GitHub
Aug 26, 2022
Browse files
[Fix]Fix dataset sweeps (#1751)
* fix dataset sweeps * fix * fix cfg * fix comments
parent
4f88f1a5
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
9 deletions
+20
-9
configs/_base_/datasets/lyft-3d.py
configs/_base_/datasets/lyft-3d.py
+1
-1
configs/_base_/datasets/nus-3d.py
configs/_base_/datasets/nus-3d.py
+1
-1
configs/centerpoint/centerpoint_0075voxel_second_secfpn_4x8_cyclic_20e_nus.py
...centerpoint_0075voxel_second_secfpn_4x8_cyclic_20e_nus.py
+1
-1
configs/centerpoint/centerpoint_01voxel_second_secfpn_4x8_cyclic_20e_nus.py
...t/centerpoint_01voxel_second_secfpn_4x8_cyclic_20e_nus.py
+1
-1
configs/centerpoint/centerpoint_02pillar_second_secfpn_4x8_cyclic_20e_nus.py
.../centerpoint_02pillar_second_secfpn_4x8_cyclic_20e_nus.py
+1
-1
mmdet3d/datasets/det3d_dataset.py
mmdet3d/datasets/det3d_dataset.py
+15
-4
No files found.
configs/_base_/datasets/lyft-3d.py
View file @
31faf9fc
...
@@ -11,7 +11,7 @@ data_root = 'data/lyft/'
...
@@ -11,7 +11,7 @@ data_root = 'data/lyft/'
# Input modality for Lyft dataset, this is consistent with the submission
# Input modality for Lyft dataset, this is consistent with the submission
# format which requires the information in input_modality.
# format which requires the information in input_modality.
input_modality
=
dict
(
use_lidar
=
True
,
use_camera
=
False
)
input_modality
=
dict
(
use_lidar
=
True
,
use_camera
=
False
)
data_prefix
=
dict
(
pts
=
'samples/LIDAR_TOP'
,
img
=
''
)
data_prefix
=
dict
(
pts
=
'samples/LIDAR_TOP'
,
img
=
''
,
sweeps
=
'sweeps/LIDAR_TOP'
)
file_client_args
=
dict
(
backend
=
'disk'
)
file_client_args
=
dict
(
backend
=
'disk'
)
# Uncomment the following if use ceph or other file clients.
# Uncomment the following if use ceph or other file clients.
...
...
configs/_base_/datasets/nus-3d.py
View file @
31faf9fc
...
@@ -12,7 +12,7 @@ data_root = 'data/nuscenes/'
...
@@ -12,7 +12,7 @@ data_root = 'data/nuscenes/'
# Input modality for nuScenes dataset, this is consistent with the submission
# Input modality for nuScenes dataset, this is consistent with the submission
# format which requires the information in input_modality.
# format which requires the information in input_modality.
input_modality
=
dict
(
use_lidar
=
True
,
use_camera
=
False
)
input_modality
=
dict
(
use_lidar
=
True
,
use_camera
=
False
)
data_prefix
=
dict
(
pts
=
'samples/LIDAR_TOP'
,
img
=
''
)
data_prefix
=
dict
(
pts
=
'samples/LIDAR_TOP'
,
img
=
''
,
sweeps
=
'sweeps/LIDAR_TOP'
)
file_client_args
=
dict
(
backend
=
'disk'
)
file_client_args
=
dict
(
backend
=
'disk'
)
# Uncomment the following if use ceph or other file clients.
# Uncomment the following if use ceph or other file clients.
...
...
configs/centerpoint/centerpoint_0075voxel_second_secfpn_4x8_cyclic_20e_nus.py
View file @
31faf9fc
...
@@ -9,7 +9,7 @@ class_names = [
...
@@ -9,7 +9,7 @@ class_names = [
'car'
,
'truck'
,
'construction_vehicle'
,
'bus'
,
'trailer'
,
'barrier'
,
'car'
,
'truck'
,
'construction_vehicle'
,
'bus'
,
'trailer'
,
'barrier'
,
'motorcycle'
,
'bicycle'
,
'pedestrian'
,
'traffic_cone'
'motorcycle'
,
'bicycle'
,
'pedestrian'
,
'traffic_cone'
]
]
data_prefix
=
dict
(
pts
=
'samples/LIDAR_TOP'
,
img
=
''
)
data_prefix
=
dict
(
pts
=
'samples/LIDAR_TOP'
,
img
=
''
,
sweeps
=
'sweeps/LIDAR_TOP'
)
model
=
dict
(
model
=
dict
(
data_preprocessor
=
dict
(
data_preprocessor
=
dict
(
voxel_layer
=
dict
(
voxel_layer
=
dict
(
...
...
configs/centerpoint/centerpoint_01voxel_second_secfpn_4x8_cyclic_20e_nus.py
View file @
31faf9fc
...
@@ -12,7 +12,7 @@ class_names = [
...
@@ -12,7 +12,7 @@ class_names = [
'car'
,
'truck'
,
'construction_vehicle'
,
'bus'
,
'trailer'
,
'barrier'
,
'car'
,
'truck'
,
'construction_vehicle'
,
'bus'
,
'trailer'
,
'barrier'
,
'motorcycle'
,
'bicycle'
,
'pedestrian'
,
'traffic_cone'
'motorcycle'
,
'bicycle'
,
'pedestrian'
,
'traffic_cone'
]
]
data_prefix
=
dict
(
pts
=
'samples/LIDAR_TOP'
,
img
=
''
)
data_prefix
=
dict
(
pts
=
'samples/LIDAR_TOP'
,
img
=
''
,
sweeps
=
'sweeps/LIDAR_TOP'
)
model
=
dict
(
model
=
dict
(
data_preprocessor
=
dict
(
data_preprocessor
=
dict
(
voxel_layer
=
dict
(
point_cloud_range
=
point_cloud_range
)),
voxel_layer
=
dict
(
point_cloud_range
=
point_cloud_range
)),
...
...
configs/centerpoint/centerpoint_02pillar_second_secfpn_4x8_cyclic_20e_nus.py
View file @
31faf9fc
...
@@ -12,7 +12,7 @@ class_names = [
...
@@ -12,7 +12,7 @@ class_names = [
'car'
,
'truck'
,
'construction_vehicle'
,
'bus'
,
'trailer'
,
'barrier'
,
'car'
,
'truck'
,
'construction_vehicle'
,
'bus'
,
'trailer'
,
'barrier'
,
'motorcycle'
,
'bicycle'
,
'pedestrian'
,
'traffic_cone'
'motorcycle'
,
'bicycle'
,
'pedestrian'
,
'traffic_cone'
]
]
data_prefix
=
dict
(
pts
=
'samples/LIDAR_TOP'
,
img
=
''
)
data_prefix
=
dict
(
pts
=
'samples/LIDAR_TOP'
,
img
=
''
,
sweeps
=
'sweeps/LIDAR_TOP'
)
model
=
dict
(
model
=
dict
(
data_preprocessor
=
dict
(
data_preprocessor
=
dict
(
voxel_layer
=
dict
(
point_cloud_range
=
point_cloud_range
)),
voxel_layer
=
dict
(
point_cloud_range
=
point_cloud_range
)),
...
...
mmdet3d/datasets/det3d_dataset.py
View file @
31faf9fc
...
@@ -93,6 +93,7 @@ class Det3DDataset(BaseDataset):
...
@@ -93,6 +93,7 @@ class Det3DDataset(BaseDataset):
f
', `use_camera`) for
{
self
.
__class__
.
__name__
}
'
)
f
', `use_camera`) for
{
self
.
__class__
.
__name__
}
'
)
self
.
box_type_3d
,
self
.
box_mode_3d
=
get_box_type
(
box_type_3d
)
self
.
box_type_3d
,
self
.
box_mode_3d
=
get_box_type
(
box_type_3d
)
if
metainfo
is
not
None
and
'CLASSES'
in
metainfo
:
if
metainfo
is
not
None
and
'CLASSES'
in
metainfo
:
# we allow to train on subset of self.METAINFO['CLASSES']
# we allow to train on subset of self.METAINFO['CLASSES']
# map unselected labels to -1
# map unselected labels to -1
...
@@ -111,10 +112,6 @@ class Det3DDataset(BaseDataset):
...
@@ -111,10 +112,6 @@ class Det3DDataset(BaseDataset):
}
}
self
.
label_mapping
[
-
1
]
=
-
1
self
.
label_mapping
[
-
1
]
=
-
1
# can be accessed by other component in runner
metainfo
[
'box_type_3d'
]
=
box_type_3d
metainfo
[
'label_mapping'
]
=
self
.
label_mapping
super
().
__init__
(
super
().
__init__
(
ann_file
=
ann_file
,
ann_file
=
ann_file
,
metainfo
=
metainfo
,
metainfo
=
metainfo
,
...
@@ -124,6 +121,10 @@ class Det3DDataset(BaseDataset):
...
@@ -124,6 +121,10 @@ class Det3DDataset(BaseDataset):
test_mode
=
test_mode
,
test_mode
=
test_mode
,
**
kwargs
)
**
kwargs
)
# can be accessed by other component in runner
self
.
metainfo
[
'box_type_3d'
]
=
box_type_3d
self
.
metainfo
[
'label_mapping'
]
=
self
.
label_mapping
def
_remove_dontcare
(
self
,
ann_info
):
def
_remove_dontcare
(
self
,
ann_info
):
"""Remove annotations that do not need to be cared.
"""Remove annotations that do not need to be cared.
...
@@ -235,6 +236,16 @@ class Det3DDataset(BaseDataset):
...
@@ -235,6 +236,16 @@ class Det3DDataset(BaseDataset):
info
[
'lidar_points'
][
'lidar_path'
])
info
[
'lidar_points'
][
'lidar_path'
])
info
[
'lidar_path'
]
=
info
[
'lidar_points'
][
'lidar_path'
]
info
[
'lidar_path'
]
=
info
[
'lidar_points'
][
'lidar_path'
]
if
'lidar_sweeps'
in
info
:
for
sweep
in
info
[
'lidar_sweeps'
]:
file_suffix
=
sweep
[
'lidar_points'
][
'lidar_path'
].
split
(
'/'
)[
-
1
]
if
'samples'
in
sweep
[
'lidar_points'
][
'lidar_path'
]:
sweep
[
'lidar_points'
][
'lidar_path'
]
=
osp
.
join
(
self
.
data_prefix
[
'pts'
],
file_suffix
)
else
:
sweep
[
'lidar_points'
][
'lidar_path'
]
=
osp
.
join
(
self
.
data_prefix
[
'sweeps'
],
file_suffix
)
if
self
.
modality
[
'use_camera'
]:
if
self
.
modality
[
'use_camera'
]:
for
cam_id
,
img_info
in
info
[
'images'
].
items
():
for
cam_id
,
img_info
in
info
[
'images'
].
items
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment