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
aeb342b7
Commit
aeb342b7
authored
May 09, 2020
by
liyinhao
Browse files
change to fstring
parent
4fc020f6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
8 deletions
+7
-8
mmdet3d/datasets/pipelines/indoor_loading.py
mmdet3d/datasets/pipelines/indoor_loading.py
+3
-4
tests/test_indoor_loading.py
tests/test_indoor_loading.py
+3
-3
tools/data_converter/sunrgbd_data_utils.py
tools/data_converter/sunrgbd_data_utils.py
+1
-1
No files found.
mmdet3d/datasets/pipelines/indoor_loading.py
View file @
aeb342b7
...
...
@@ -47,10 +47,9 @@ class IndoorLoadPointsFromFile(object):
def
__init__
(
self
,
use_height
,
load_dim
=
6
,
use_dim
=
[
0
,
1
,
2
]):
self
.
use_height
=
use_height
assert
max
(
use_dim
)
<
load_dim
,
f
'Expect all used dimensions <
{
load_dim
}
, '
\
f
'got
{
use_dim
}
'
assert
max
(
use_dim
)
<
load_dim
,
\
f
'Expect all used dimensions <
{
load_dim
}
, got
{
use_dim
}
'
self
.
load_dim
=
load_dim
self
.
use_dim
=
use_dim
...
...
tests/test_indoor_loading.py
View file @
aeb342b7
...
...
@@ -15,7 +15,7 @@ def test_indoor_load_points_from_file():
sunrgbd_info
=
sunrgbd_info
[
0
]
scan_name
=
sunrgbd_info
[
'point_cloud'
][
'lidar_idx'
]
sunrgbd_results
[
'pts_filename'
]
=
osp
.
join
(
data_path
,
'lidar'
,
'%06d.npy'
%
scan_name
)
f
'
{
scan_name
:
06
d
}
.npy'
)
sunrgbd_results
=
sunrgbd_load_points_from_file
(
sunrgbd_results
)
sunrgbd_point_cloud
=
sunrgbd_results
[
'points'
]
assert
sunrgbd_point_cloud
.
shape
==
(
100
,
4
)
...
...
@@ -29,7 +29,7 @@ def test_indoor_load_points_from_file():
scan_name
=
scannet_info
[
'point_cloud'
][
'lidar_idx'
]
scannet_results
[
'pts_filename'
]
=
osp
.
join
(
data_path
,
scan_name
+
'
_vert.npy'
)
f
'
{
scan_name
}
_vert.npy'
)
scannet_results
=
scannet_load_data
(
scannet_results
)
scannet_point_cloud
=
scannet_results
[
'points'
]
assert
scannet_point_cloud
.
shape
==
(
100
,
4
)
...
...
@@ -63,7 +63,7 @@ def test_load_annotations3D():
scannet_gt_bboxes_3d_mask
=
np
.
zeros
((
1
,
1
))
scan_name
=
scannet_info
[
'point_cloud'
][
'lidar_idx'
]
scannet_results
[
'pts_instance_mask_path'
]
=
osp
.
join
(
data_path
,
scan_name
+
'
_ins_label.npy'
)
data_path
,
f
'
{
scan_name
}
_ins_label.npy'
)
scannet_results
[
'pts_semantic_mask_path'
]
=
osp
.
join
(
data_path
,
scan_name
+
'_sem_label.npy'
)
scannet_results
[
'info'
]
=
scannet_info
...
...
tools/data_converter/sunrgbd_data_utils.py
View file @
aeb342b7
...
...
@@ -147,7 +147,7 @@ class SUNRGBDData(object):
pc_upright_depth_subsampled
=
random_sampling
(
pc_upright_depth
,
SAMPLE_NUM
)
np
.
save
(
os
.
path
.
join
(
self
.
root_dir
,
'lidar'
,
'%06d.npy'
%
sample_idx
),
os
.
path
.
join
(
self
.
root_dir
,
'lidar'
,
f
'
{
sample_idx
:
06
d
}
.npy'
),
pc_upright_depth_subsampled
)
info
=
dict
()
...
...
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