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
6060ff80
Commit
6060ff80
authored
May 14, 2020
by
liyinhao
Browse files
add pts masks to the DC, remove __init__.py
parent
fd2e572e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
7 deletions
+8
-7
mmdet3d/datasets/pipelines/formating.py
mmdet3d/datasets/pipelines/formating.py
+2
-1
mmdet3d/datasets/pipelines/indoor_loading.py
mmdet3d/datasets/pipelines/indoor_loading.py
+2
-2
tests/__init__.py
tests/__init__.py
+0
-0
tests/test_pipeline/test_indoor_pipeline.py
tests/test_pipeline/test_indoor_pipeline.py
+4
-4
No files found.
mmdet3d/datasets/pipelines/formating.py
View file @
6060ff80
...
@@ -40,7 +40,8 @@ class DefaultFormatBundle(object):
...
@@ -40,7 +40,8 @@ class DefaultFormatBundle(object):
results
[
'img'
]
=
DC
(
to_tensor
(
img
),
stack
=
True
)
results
[
'img'
]
=
DC
(
to_tensor
(
img
),
stack
=
True
)
for
key
in
[
for
key
in
[
'proposals'
,
'gt_bboxes'
,
'gt_bboxes_3d'
,
'gt_bboxes_ignore'
,
'proposals'
,
'gt_bboxes'
,
'gt_bboxes_3d'
,
'gt_bboxes_ignore'
,
'gt_labels'
,
'gt_labels_3d'
'gt_labels'
,
'gt_labels_3d'
,
'pts_instance_mask'
,
'pts_semantic_mask'
]:
]:
if
key
not
in
results
:
if
key
not
in
results
:
continue
continue
...
...
mmdet3d/datasets/pipelines/indoor_loading.py
View file @
6060ff80
...
@@ -92,8 +92,8 @@ class IndoorLoadAnnotations3D(object):
...
@@ -92,8 +92,8 @@ class IndoorLoadAnnotations3D(object):
mmcv
.
check_file_exist
(
pts_instance_mask_path
)
mmcv
.
check_file_exist
(
pts_instance_mask_path
)
mmcv
.
check_file_exist
(
pts_semantic_mask_path
)
mmcv
.
check_file_exist
(
pts_semantic_mask_path
)
pts_instance_mask
=
np
.
load
(
pts_instance_mask_path
)
pts_instance_mask
=
np
.
load
(
pts_instance_mask_path
)
.
astype
(
np
.
int
)
pts_semantic_mask
=
np
.
load
(
pts_semantic_mask_path
)
pts_semantic_mask
=
np
.
load
(
pts_semantic_mask_path
)
.
astype
(
np
.
int
)
results
[
'pts_instance_mask'
]
=
pts_instance_mask
results
[
'pts_instance_mask'
]
=
pts_instance_mask
results
[
'pts_semantic_mask'
]
=
pts_semantic_mask
results
[
'pts_semantic_mask'
]
=
pts_semantic_mask
...
...
tests/__init__.py
deleted
100644 → 0
View file @
fd2e572e
tests/test_pipeline/test_indoor_pipeline.py
View file @
6060ff80
...
@@ -66,8 +66,8 @@ def test_scannet_pipeline():
...
@@ -66,8 +66,8 @@ def test_scannet_pipeline():
points
=
results
[
'points'
].
_data
points
=
results
[
'points'
].
_data
gt_bboxes_3d
=
results
[
'gt_bboxes_3d'
].
_data
gt_bboxes_3d
=
results
[
'gt_bboxes_3d'
].
_data
gt_labels_3d
=
results
[
'gt_labels_3d'
].
_data
gt_labels_3d
=
results
[
'gt_labels_3d'
].
_data
pts_semantic_mask
=
results
[
'pts_semantic_mask'
]
pts_semantic_mask
=
results
[
'pts_semantic_mask'
]
.
_data
pts_instance_mask
=
results
[
'pts_instance_mask'
]
pts_instance_mask
=
results
[
'pts_instance_mask'
]
.
_data
expected_points
=
np
.
array
(
expected_points
=
np
.
array
(
[[
-
2.9078157
,
-
1.9569951
,
2.3543026
,
2.389488
],
[[
-
2.9078157
,
-
1.9569951
,
2.3543026
,
2.389488
],
[
-
0.71360034
,
-
3.4359822
,
2.1330001
,
2.1681855
],
[
-
0.71360034
,
-
3.4359822
,
2.1330001
,
2.1681855
],
...
@@ -90,8 +90,8 @@ def test_scannet_pipeline():
...
@@ -90,8 +90,8 @@ def test_scannet_pipeline():
assert
np
.
allclose
(
points
,
expected_points
)
assert
np
.
allclose
(
points
,
expected_points
)
assert
np
.
allclose
(
gt_bboxes_3d
[:
5
,
:],
expected_gt_bboxes_3d
)
assert
np
.
allclose
(
gt_bboxes_3d
[:
5
,
:],
expected_gt_bboxes_3d
)
assert
np
.
all
(
gt_labels_3d
.
numpy
()
==
expected_gt_labels_3d
)
assert
np
.
all
(
gt_labels_3d
.
numpy
()
==
expected_gt_labels_3d
)
assert
np
.
all
(
pts_semantic_mask
==
expected_pts_semantic_mask
)
assert
np
.
all
(
pts_semantic_mask
.
numpy
()
==
expected_pts_semantic_mask
)
assert
np
.
all
(
pts_instance_mask
==
expected_pts_instance_mask
)
assert
np
.
all
(
pts_instance_mask
.
numpy
()
==
expected_pts_instance_mask
)
def
test_sunrgbd_pipeline
():
def
test_sunrgbd_pipeline
():
...
...
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