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
8348ae3c
Commit
8348ae3c
authored
May 07, 2020
by
liyinhao
Browse files
fix some bugs and extra key
parent
ac77413f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
6 deletions
+3
-6
mmdet3d/datasets/pipelines/indoor_loading.py
mmdet3d/datasets/pipelines/indoor_loading.py
+3
-3
tests/test_indoor_loading.py
tests/test_indoor_loading.py
+0
-3
No files found.
mmdet3d/datasets/pipelines/indoor_loading.py
View file @
8348ae3c
...
@@ -37,7 +37,8 @@ class LoadPointsFromFile(object):
...
@@ -37,7 +37,8 @@ class LoadPointsFromFile(object):
else
:
else
:
points
=
np
.
load
(
pts_filename
)[
'pc'
]
points
=
np
.
load
(
pts_filename
)[
'pc'
]
points
=
points
.
reshape
(
-
1
,
self
.
load_dim
)
points
=
points
.
reshape
(
-
1
,
self
.
load_dim
)
points
[:,
3
:
6
]
=
points
[:,
3
:
6
]
-
np
.
array
(
self
.
color_mean
)
/
256.0
if
self
.
load_dim
>=
6
:
points
[:,
3
:
6
]
=
points
[:,
3
:
6
]
-
np
.
array
(
self
.
color_mean
)
/
256.0
points
=
points
[:,
self
.
use_dim
]
points
=
points
[:,
self
.
use_dim
]
if
self
.
use_height
:
if
self
.
use_height
:
...
@@ -78,9 +79,8 @@ class LoadAnnotations3D(object):
...
@@ -78,9 +79,8 @@ class LoadAnnotations3D(object):
gt_bboxes_3d
=
np
.
zeros
((
1
,
6
),
dtype
=
np
.
float32
)
gt_bboxes_3d
=
np
.
zeros
((
1
,
6
),
dtype
=
np
.
float32
)
gt_labels
=
np
.
zeros
((
1
,
1
))
gt_labels
=
np
.
zeros
((
1
,
1
))
gt_bboxes_3d_mask
=
np
.
zeros
((
1
,
1
))
gt_bboxes_3d_mask
=
np
.
zeros
((
1
,
1
))
name
=
'scannet'
if
info
.
get
(
'image'
,
None
)
is
None
else
'sunrgbd'
if
name
==
'scannet'
:
if
ins_labelname
is
not
None
and
sem_labelname
is
not
None
:
assert
osp
.
exists
(
ins_labelname
)
assert
osp
.
exists
(
ins_labelname
)
assert
osp
.
exists
(
sem_labelname
)
assert
osp
.
exists
(
sem_labelname
)
pts_instance_mask
=
np
.
load
(
ins_labelname
)
pts_instance_mask
=
np
.
load
(
ins_labelname
)
...
...
tests/test_indoor_loading.py
View file @
8348ae3c
...
@@ -12,7 +12,6 @@ def test_load_points_from_file():
...
@@ -12,7 +12,6 @@ def test_load_points_from_file():
6
)
6
)
sunrgbd_results
=
dict
()
sunrgbd_results
=
dict
()
data_path
=
'./tests/data/sunrgbd/sunrgbd_trainval'
data_path
=
'./tests/data/sunrgbd/sunrgbd_trainval'
sunrgbd_results
[
'data_path'
]
=
data_path
sunrgbd_info
=
sunrgbd_info
[
0
]
sunrgbd_info
=
sunrgbd_info
[
0
]
scan_name
=
sunrgbd_info
[
'point_cloud'
][
'lidar_idx'
]
scan_name
=
sunrgbd_info
[
'point_cloud'
][
'lidar_idx'
]
sunrgbd_results
[
'info'
]
=
sunrgbd_info
sunrgbd_results
[
'info'
]
=
sunrgbd_info
...
@@ -41,7 +40,6 @@ def test_load_annotations3D():
...
@@ -41,7 +40,6 @@ def test_load_annotations3D():
sunrgbd_info
=
mmcv
.
load
(
'./tests/data/sunrgbd/sunrgbd_infos.pkl'
)
sunrgbd_info
=
mmcv
.
load
(
'./tests/data/sunrgbd/sunrgbd_infos.pkl'
)
sunrgbd_load_annotations3D
=
LoadAnnotations3D
()
sunrgbd_load_annotations3D
=
LoadAnnotations3D
()
sunrgbd_results
=
dict
()
sunrgbd_results
=
dict
()
sunrgbd_results
[
'data_path'
]
=
'./tests/data/sunrgbd/sunrgbd_trainval'
sunrgbd_results
[
'info'
]
=
sunrgbd_info
[
0
]
sunrgbd_results
[
'info'
]
=
sunrgbd_info
[
0
]
sunrgbd_results
=
sunrgbd_load_annotations3D
(
sunrgbd_results
)
sunrgbd_results
=
sunrgbd_load_annotations3D
(
sunrgbd_results
)
sunrgbd_gt_boxes
=
sunrgbd_results
.
get
(
'gt_bboxes_3d'
,
None
)
sunrgbd_gt_boxes
=
sunrgbd_results
.
get
(
'gt_bboxes_3d'
,
None
)
...
@@ -55,7 +53,6 @@ def test_load_annotations3D():
...
@@ -55,7 +53,6 @@ def test_load_annotations3D():
scannet_load_annotations3D
=
LoadAnnotations3D
()
scannet_load_annotations3D
=
LoadAnnotations3D
()
scannet_results
=
dict
()
scannet_results
=
dict
()
data_path
=
'./tests/data/scannet/scannet_train_instance_data'
data_path
=
'./tests/data/scannet/scannet_train_instance_data'
scannet_results
[
'data_path'
]
=
data_path
scannet_info
=
scannet_info
[
0
]
scannet_info
=
scannet_info
[
0
]
scan_name
=
scannet_info
[
'point_cloud'
][
'lidar_idx'
]
scan_name
=
scannet_info
[
'point_cloud'
][
'lidar_idx'
]
scannet_results
[
'ins_labelname'
]
=
osp
.
join
(
data_path
,
scannet_results
[
'ins_labelname'
]
=
osp
.
join
(
data_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