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
d86dffa4
Commit
d86dffa4
authored
May 02, 2020
by
liyinhao
Browse files
change mean_color to color_mean
parent
9afa546a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
mmdet3d/datasets/pipelines/indoor_loading.py
mmdet3d/datasets/pipelines/indoor_loading.py
+5
-5
No files found.
mmdet3d/datasets/pipelines/indoor_loading.py
View file @
d86dffa4
...
@@ -15,13 +15,13 @@ class LoadPointsFromFile(object):
...
@@ -15,13 +15,13 @@ class LoadPointsFromFile(object):
name (str): scannet or sunrgbd.
name (str): scannet or sunrgbd.
use_color (bool): Whether to use color.
use_color (bool): Whether to use color.
use_height (bool): Whether to use height.
use_height (bool): Whether to use height.
mean_
color (List[float]): Mean color of the point cloud.
color
_mean
(List[float]): Mean color of the point cloud.
"""
"""
def
__init__
(
self
,
use_color
,
use_height
,
mean_
color
):
def
__init__
(
self
,
use_color
,
use_height
,
color
_mean
):
self
.
use_color
=
use_color
self
.
use_color
=
use_color
self
.
use_height
=
use_height
self
.
use_height
=
use_height
self
.
mean_
color
=
mean
_
color
self
.
color
_
mean
=
color
_mean
def
__call__
(
self
,
results
):
def
__call__
(
self
,
results
):
data_path
=
results
.
get
(
'data_path'
,
None
)
data_path
=
results
.
get
(
'data_path'
,
None
)
...
@@ -44,7 +44,7 @@ class LoadPointsFromFile(object):
...
@@ -44,7 +44,7 @@ class LoadPointsFromFile(object):
pcl_color
=
point_cloud
[:,
3
:
6
]
pcl_color
=
point_cloud
[:,
3
:
6
]
point_cloud
=
point_cloud
[:,
0
:
6
]
point_cloud
=
point_cloud
[:,
0
:
6
]
point_cloud
[:,
3
:]
=
(
point_cloud
[:,
3
:]
-
point_cloud
[:,
3
:]
=
(
point_cloud
[:,
3
:]
-
np
.
array
(
self
.
mean_
color
))
/
256.0
np
.
array
(
self
.
color
_mean
))
/
256.0
if
self
.
use_height
:
if
self
.
use_height
:
floor_height
=
np
.
percentile
(
point_cloud
[:,
2
],
0.99
)
floor_height
=
np
.
percentile
(
point_cloud
[:,
2
],
0.99
)
...
@@ -60,7 +60,7 @@ class LoadPointsFromFile(object):
...
@@ -60,7 +60,7 @@ class LoadPointsFromFile(object):
repr_str
=
self
.
__class__
.
__name__
repr_str
=
self
.
__class__
.
__name__
repr_str
+=
'(use_height={})'
.
format
(
self
.
use_height
)
repr_str
+=
'(use_height={})'
.
format
(
self
.
use_height
)
repr_str
+=
'(use_color={}'
.
format
(
self
.
use_color
)
repr_str
+=
'(use_color={}'
.
format
(
self
.
use_color
)
repr_str
+=
'(mean_color={})'
.
format
(
self
.
mean_
color
)
repr_str
+=
'(mean_color={})'
.
format
(
self
.
color
_mean
)
return
repr_str
return
repr_str
def
_get_lidar
(
self
,
scan_name
,
data_path
):
def
_get_lidar
(
self
,
scan_name
,
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