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
fd2e572e
Commit
fd2e572e
authored
May 13, 2020
by
liyinhao
Browse files
change astype to dtype
parent
90602f7e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
tests/test_pipeline/test_indoor_loading.py
tests/test_pipeline/test_indoor_loading.py
+6
-6
tests/test_pipeline/test_indoor_pipeline.py
tests/test_pipeline/test_indoor_pipeline.py
+5
-5
No files found.
tests/test_pipeline/test_indoor_loading.py
View file @
fd2e572e
...
@@ -40,12 +40,12 @@ def test_load_annotations3D():
...
@@ -40,12 +40,12 @@ def test_load_annotations3D():
if
sunrgbd_info
[
'annos'
][
'gt_num'
]
!=
0
:
if
sunrgbd_info
[
'annos'
][
'gt_num'
]
!=
0
:
sunrgbd_gt_bboxes_3d
=
sunrgbd_info
[
'annos'
][
'gt_boxes_upright_depth'
]
sunrgbd_gt_bboxes_3d
=
sunrgbd_info
[
'annos'
][
'gt_boxes_upright_depth'
]
sunrgbd_gt_labels_3d
=
sunrgbd_info
[
'annos'
][
'class'
]
sunrgbd_gt_labels_3d
=
sunrgbd_info
[
'annos'
][
'class'
]
sunrgbd_gt_bboxes_3d_mask
=
np
.
ones_like
(
sunrgbd_gt_labels_3d
).
astype
(
sunrgbd_gt_bboxes_3d_mask
=
np
.
ones_like
(
np
.
bool
)
sunrgbd_gt_labels_3d
,
dtype
=
np
.
bool
)
else
:
else
:
sunrgbd_gt_bboxes_3d
=
np
.
zeros
((
1
,
6
),
dtype
=
np
.
float32
)
sunrgbd_gt_bboxes_3d
=
np
.
zeros
((
1
,
6
),
dtype
=
np
.
float32
)
sunrgbd_gt_labels_3d
=
np
.
zeros
((
1
,
))
sunrgbd_gt_labels_3d
=
np
.
zeros
((
1
,
))
sunrgbd_gt_bboxes_3d_mask
=
np
.
zeros
((
1
,
))
sunrgbd_gt_bboxes_3d_mask
=
np
.
zeros
((
1
,
)
,
dtype
=
np
.
bool
)
assert
sunrgbd_gt_bboxes_3d
.
shape
==
(
3
,
7
)
assert
sunrgbd_gt_bboxes_3d
.
shape
==
(
3
,
7
)
assert
sunrgbd_gt_labels_3d
.
shape
==
(
3
,
)
assert
sunrgbd_gt_labels_3d
.
shape
==
(
3
,
)
assert
sunrgbd_gt_bboxes_3d_mask
.
shape
==
(
3
,
)
assert
sunrgbd_gt_bboxes_3d_mask
.
shape
==
(
3
,
)
...
@@ -57,12 +57,12 @@ def test_load_annotations3D():
...
@@ -57,12 +57,12 @@ def test_load_annotations3D():
if
scannet_info
[
'annos'
][
'gt_num'
]
!=
0
:
if
scannet_info
[
'annos'
][
'gt_num'
]
!=
0
:
scannet_gt_bboxes_3d
=
scannet_info
[
'annos'
][
'gt_boxes_upright_depth'
]
scannet_gt_bboxes_3d
=
scannet_info
[
'annos'
][
'gt_boxes_upright_depth'
]
scannet_gt_labels_3d
=
scannet_info
[
'annos'
][
'class'
]
scannet_gt_labels_3d
=
scannet_info
[
'annos'
][
'class'
]
scannet_gt_bboxes_3d_mask
=
np
.
ones_like
(
scannet_gt_labels_3d
).
astype
(
scannet_gt_bboxes_3d_mask
=
np
.
ones_like
(
np
.
bool
)
scannet_gt_labels_3d
,
dtype
=
np
.
bool
)
else
:
else
:
scannet_gt_bboxes_3d
=
np
.
zeros
((
1
,
6
),
dtype
=
np
.
float32
)
scannet_gt_bboxes_3d
=
np
.
zeros
((
1
,
6
),
dtype
=
np
.
float32
)
scannet_gt_labels_3d
=
np
.
zeros
((
1
,
))
scannet_gt_labels_3d
=
np
.
zeros
((
1
,
))
scannet_gt_bboxes_3d_mask
=
np
.
zeros
((
1
,
)
).
as
type
(
np
.
bool
)
scannet_gt_bboxes_3d_mask
=
np
.
zeros
((
1
,
)
,
d
type
=
np
.
bool
)
scan_name
=
scannet_info
[
'point_cloud'
][
'lidar_idx'
]
scan_name
=
scannet_info
[
'point_cloud'
][
'lidar_idx'
]
scannet_results
[
'pts_instance_mask_path'
]
=
osp
.
join
(
scannet_results
[
'pts_instance_mask_path'
]
=
osp
.
join
(
data_path
,
f
'
{
scan_name
}
_ins_label.npy'
)
data_path
,
f
'
{
scan_name
}
_ins_label.npy'
)
...
...
tests/test_pipeline/test_indoor_pipeline.py
View file @
fd2e572e
...
@@ -45,12 +45,12 @@ def test_scannet_pipeline():
...
@@ -45,12 +45,12 @@ def test_scannet_pipeline():
if
info
[
'annos'
][
'gt_num'
]
!=
0
:
if
info
[
'annos'
][
'gt_num'
]
!=
0
:
scannet_gt_bboxes_3d
=
info
[
'annos'
][
'gt_boxes_upright_depth'
]
scannet_gt_bboxes_3d
=
info
[
'annos'
][
'gt_boxes_upright_depth'
]
scannet_gt_labels_3d
=
info
[
'annos'
][
'class'
]
scannet_gt_labels_3d
=
info
[
'annos'
][
'class'
]
scannet_gt_bboxes_3d_mask
=
np
.
ones_like
(
scannet_gt_labels_3d
).
astype
(
scannet_gt_bboxes_3d_mask
=
np
.
ones_like
(
np
.
bool
)
scannet_gt_labels_3d
,
dtype
=
np
.
bool
)
else
:
else
:
scannet_gt_bboxes_3d
=
np
.
zeros
((
1
,
6
),
dtype
=
np
.
float32
)
scannet_gt_bboxes_3d
=
np
.
zeros
((
1
,
6
),
dtype
=
np
.
float32
)
scannet_gt_labels_3d
=
np
.
zeros
((
1
,
))
scannet_gt_labels_3d
=
np
.
zeros
((
1
,
))
scannet_gt_bboxes_3d_mask
=
np
.
zeros
((
1
,
)
).
as
type
(
np
.
bool
)
scannet_gt_bboxes_3d_mask
=
np
.
zeros
((
1
,
)
,
d
type
=
np
.
bool
)
scan_name
=
info
[
'point_cloud'
][
'lidar_idx'
]
scan_name
=
info
[
'point_cloud'
][
'lidar_idx'
]
results
[
'pts_instance_mask_path'
]
=
osp
.
join
(
data_path
,
results
[
'pts_instance_mask_path'
]
=
osp
.
join
(
data_path
,
...
@@ -126,11 +126,11 @@ def test_sunrgbd_pipeline():
...
@@ -126,11 +126,11 @@ def test_sunrgbd_pipeline():
if
info
[
'annos'
][
'gt_num'
]
!=
0
:
if
info
[
'annos'
][
'gt_num'
]
!=
0
:
gt_bboxes_3d
=
info
[
'annos'
][
'gt_boxes_upright_depth'
]
gt_bboxes_3d
=
info
[
'annos'
][
'gt_boxes_upright_depth'
]
gt_labels_3d
=
info
[
'annos'
][
'class'
]
gt_labels_3d
=
info
[
'annos'
][
'class'
]
gt_bboxes_3d_mask
=
np
.
ones_like
(
gt_labels_3d
).
as
type
(
np
.
bool
)
gt_bboxes_3d_mask
=
np
.
ones_like
(
gt_labels_3d
,
d
type
=
np
.
bool
)
else
:
else
:
gt_bboxes_3d
=
np
.
zeros
((
1
,
6
),
dtype
=
np
.
float32
)
gt_bboxes_3d
=
np
.
zeros
((
1
,
6
),
dtype
=
np
.
float32
)
gt_labels_3d
=
np
.
zeros
((
1
,
))
gt_labels_3d
=
np
.
zeros
((
1
,
))
gt_bboxes_3d_mask
=
np
.
zeros
((
1
,
)
).
as
type
(
np
.
bool
)
gt_bboxes_3d_mask
=
np
.
zeros
((
1
,
)
,
d
type
=
np
.
bool
)
results
[
'gt_bboxes_3d'
]
=
gt_bboxes_3d
results
[
'gt_bboxes_3d'
]
=
gt_bboxes_3d
results
[
'gt_labels_3d'
]
=
gt_labels_3d
results
[
'gt_labels_3d'
]
=
gt_labels_3d
...
...
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