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
6318a119
Unverified
Commit
6318a119
authored
Feb 20, 2023
by
xizaoqu
Committed by
GitHub
Feb 20, 2023
Browse files
[Enhance]: modify seg_3d_type from dtype to string (#2297)
parent
a32c0794
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
mmdet3d/datasets/transforms/loading.py
mmdet3d/datasets/transforms/loading.py
+4
-3
tests/test_datasets/test_semantickitti_dataset.py
tests/test_datasets/test_semantickitti_dataset.py
+1
-1
tests/test_datasets/test_transforms/test_loading.py
tests/test_datasets/test_transforms/test_loading.py
+1
-1
No files found.
mmdet3d/datasets/transforms/loading.py
View file @
6318a119
...
...
@@ -801,7 +801,8 @@ class LoadAnnotations3D(LoadAnnotations):
Defaults to False.
poly2mask (bool): Whether to convert polygon annotations to bitmasks.
Defaults to True.
seg_3d_dtype (dtype): Dtype of 3D semantic masks. Defaults to int64.
seg_3d_dtype (str): String of dtype of 3D semantic masks.
Defaults to 'np.int64'.
seg_offset (int): The offset to split semantic and instance labels from
panoptic labels. Defaults to None.
dataset_type (str): Type of dataset used for splitting semantic and
...
...
@@ -825,7 +826,7 @@ class LoadAnnotations3D(LoadAnnotations):
with_bbox_depth
:
bool
=
False
,
with_panoptic_3d
:
bool
=
False
,
poly2mask
:
bool
=
True
,
seg_3d_dtype
:
np
.
dtype
=
np
.
int64
,
seg_3d_dtype
:
str
=
'
np.int64
'
,
seg_offset
:
int
=
None
,
dataset_type
:
str
=
None
,
file_client_args
:
dict
=
dict
(
backend
=
'disk'
)
...
...
@@ -844,7 +845,7 @@ class LoadAnnotations3D(LoadAnnotations):
self
.
with_mask_3d
=
with_mask_3d
self
.
with_seg_3d
=
with_seg_3d
self
.
with_panoptic_3d
=
with_panoptic_3d
self
.
seg_3d_dtype
=
seg_3d_dtype
self
.
seg_3d_dtype
=
eval
(
seg_3d_dtype
)
self
.
seg_offset
=
seg_offset
self
.
dataset_type
=
dataset_type
self
.
file_client
=
None
...
...
tests/test_datasets/test_semantickitti_dataset.py
View file @
6318a119
...
...
@@ -88,7 +88,7 @@ def _generate_semantickitti_dataset_config():
with_label_3d
=
False
,
with_mask_3d
=
False
,
with_seg_3d
=
True
,
seg_3d_dtype
=
np
.
int32
),
seg_3d_dtype
=
'
np.int32
'
),
dict
(
type
=
'PointSegClassMapping'
),
dict
(
type
=
'Pack3DDetInputs'
,
keys
=
[
'points'
,
'pts_semantic_mask'
])
]
...
...
tests/test_datasets/test_transforms/test_loading.py
View file @
6318a119
...
...
@@ -61,7 +61,7 @@ class TestLoadAnnotations3D(unittest.TestCase):
with_panoptic_3d
=
True
,
seg_offset
=
2
**
16
,
dataset_type
=
'semantickitti'
,
seg_3d_dtype
=
np
.
uint32
,
seg_3d_dtype
=
'
np.uint32
'
,
file_client_args
=
file_client_args
)
self
.
assertIs
(
load_anns_transform
.
with_seg
,
False
)
self
.
assertIs
(
load_anns_transform
.
with_bbox_3d
,
True
)
...
...
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