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
OpenPCDet
Commits
4713332c
Unverified
Commit
4713332c
authored
Dec 03, 2022
by
CSautier
Committed by
GitHub
Dec 03, 2022
Browse files
fixed deprecation warning evaluation ONCE (#1210)
parent
028ed72e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
pcdet/datasets/once/once_eval/eval_utils.py
pcdet/datasets/once/once_eval/eval_utils.py
+14
-10
No files found.
pcdet/datasets/once/once_eval/eval_utils.py
View file @
4713332c
import
numpy
as
np
def
compute_split_parts
(
num_samples
,
num_parts
):
part_samples
=
num_samples
//
num_parts
remain_samples
=
num_samples
%
num_parts
...
...
@@ -10,19 +11,21 @@ def compute_split_parts(num_samples, num_parts):
else
:
return
[
part_samples
]
*
num_parts
+
[
remain_samples
]
def
overall_filter
(
boxes
):
ignore
=
np
.
zeros
(
boxes
.
shape
[
0
],
dtype
=
np
.
bool
)
# all false
ignore
=
np
.
zeros
(
boxes
.
shape
[
0
],
dtype
=
bool
)
# all false
return
ignore
def
distance_filter
(
boxes
,
level
):
ignore
=
np
.
ones
(
boxes
.
shape
[
0
],
dtype
=
np
.
bool
)
# all true
ignore
=
np
.
ones
(
boxes
.
shape
[
0
],
dtype
=
bool
)
# all true
dist
=
np
.
sqrt
(
np
.
sum
(
boxes
[:,
0
:
3
]
*
boxes
[:,
0
:
3
],
axis
=
1
))
if
level
==
0
:
# 0-30m
if
level
==
0
:
# 0-30m
flag
=
dist
<
30
elif
level
==
1
:
# 30-50m
elif
level
==
1
:
# 30-50m
flag
=
(
dist
>=
30
)
&
(
dist
<
50
)
elif
level
==
2
:
# 50m-inf
elif
level
==
2
:
# 50m-inf
flag
=
dist
>=
50
else
:
assert
False
,
'level < 3 for distance metric, found level %s'
%
(
str
(
level
))
...
...
@@ -30,17 +33,18 @@ def distance_filter(boxes, level):
ignore
[
flag
]
=
False
return
ignore
def
overall_distance_filter
(
boxes
,
level
):
ignore
=
np
.
ones
(
boxes
.
shape
[
0
],
dtype
=
np
.
bool
)
# all true
ignore
=
np
.
ones
(
boxes
.
shape
[
0
],
dtype
=
bool
)
# all true
dist
=
np
.
sqrt
(
np
.
sum
(
boxes
[:,
0
:
3
]
*
boxes
[:,
0
:
3
],
axis
=
1
))
if
level
==
0
:
flag
=
np
.
ones
(
boxes
.
shape
[
0
],
dtype
=
np
.
bool
)
elif
level
==
1
:
# 0-30m
flag
=
np
.
ones
(
boxes
.
shape
[
0
],
dtype
=
bool
)
elif
level
==
1
:
# 0-30m
flag
=
dist
<
30
elif
level
==
2
:
# 30-50m
elif
level
==
2
:
# 30-50m
flag
=
(
dist
>=
30
)
&
(
dist
<
50
)
elif
level
==
3
:
# 50m-inf
elif
level
==
3
:
# 50m-inf
flag
=
dist
>=
50
else
:
assert
False
,
'level < 4 for overall & distance metric, found level %s'
%
(
str
(
level
))
...
...
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