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
ea22f8ec
Unverified
Commit
ea22f8ec
authored
Aug 30, 2022
by
Qing Lian
Committed by
GitHub
Aug 30, 2022
Browse files
add METAINFO for waymo dataset and support file_client_args for waymo evaluation (#1769)
parent
c9ff1832
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
mmdet3d/datasets/waymo_dataset.py
mmdet3d/datasets/waymo_dataset.py
+2
-3
mmdet3d/evaluation/metrics/waymo_metric.py
mmdet3d/evaluation/metrics/waymo_metric.py
+3
-4
mmdet3d/utils/misc.py
mmdet3d/utils/misc.py
+4
-0
No files found.
mmdet3d/datasets/waymo_dataset.py
View file @
ea22f8ec
...
...
@@ -59,8 +59,7 @@ class WaymoDataset(KittiDataset):
mono3d: take the groundtruth that can be seen in the cam.
max_sweeps (int, optional): max sweep for each frame.
"""
CLASSES
=
(
'Car'
,
'Pedestrian'
,
'Cyclist'
)
METAINFO
=
{
'CLASSES'
:
(
'Car'
,
'Pedestrian'
,
'Cyclist'
)}
def
__init__
(
self
,
data_root
:
str
,
...
...
@@ -88,7 +87,7 @@ class WaymoDataset(KittiDataset):
# set loading mode for different task settings
self
.
cam_sync_instances
=
cam_sync_instances
# construct self.cat_ids for vision-only anns parsing
self
.
cat_ids
=
range
(
len
(
self
.
CLASSES
))
self
.
cat_ids
=
range
(
len
(
self
.
METAINFO
[
'
CLASSES
'
]
))
self
.
cat2label
=
{
cat_id
:
i
for
i
,
cat_id
in
enumerate
(
self
.
cat_ids
)}
self
.
max_sweeps
=
max_sweeps
self
.
task
=
task
...
...
mmdet3d/evaluation/metrics/waymo_metric.py
View file @
ea22f8ec
...
...
@@ -73,7 +73,6 @@ class WaymoMetric(KittiMetric):
self
.
waymo_bin_file
=
waymo_bin_file
self
.
data_root
=
data_root
self
.
file_client_args
=
file_client_args
self
.
split
=
split
self
.
task
=
task
self
.
use_pred_sample_idx
=
use_pred_sample_idx
...
...
@@ -85,7 +84,8 @@ class WaymoMetric(KittiMetric):
pklfile_prefix
=
pklfile_prefix
,
submission_prefix
=
submission_prefix
,
default_cam_key
=
default_cam_key
,
collect_device
=
collect_device
)
collect_device
=
collect_device
,
file_client_args
=
file_client_args
)
self
.
default_prefix
=
'Waymo metric'
def
compute_metrics
(
self
,
results
:
list
)
->
Dict
[
str
,
float
]:
...
...
@@ -102,8 +102,7 @@ class WaymoMetric(KittiMetric):
self
.
classes
=
self
.
dataset_meta
[
'CLASSES'
]
# load annotations
self
.
data_infos
=
load
(
self
.
ann_file
,
file_client_args
=
self
.
file_client_args
)[
'data_list'
]
self
.
data_infos
=
load
(
self
.
ann_file
)[
'data_list'
]
# different from kitti, waymo do not need to convert the ann file
if
self
.
pklfile_prefix
is
None
:
...
...
mmdet3d/utils/misc.py
View file @
ea22f8ec
...
...
@@ -75,6 +75,10 @@ def replace_ceph_backend(cfg):
cfg_pretty_text
=
cfg_pretty_text
.
replace
(
'LoadAnnotations3D
\'
'
,
'LoadAnnotations3D
\'
,'
+
replace_strs
)
# replace WaymoMetric
cfg_pretty_text
=
cfg_pretty_text
.
replace
(
'WaymoMetric
\'
'
,
'WaymoMetric
\'
,'
+
replace_strs
)
# replace dbsampler
cfg_pretty_text
=
cfg_pretty_text
.
replace
(
'info_path'
,
replace_strs
+
', info_path'
)
...
...
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