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
fee31738
Commit
fee31738
authored
May 16, 2020
by
liyinhao
Browse files
add test_average_precision
parent
62565405
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
tests/test_dataset/test_indoor_eval.py
tests/test_dataset/test_indoor_eval.py
+9
-1
No files found.
tests/test_dataset/test_indoor_eval.py
View file @
fee31738
import
numpy
as
np
from
mmdet3d.core.evaluation.indoor_eval
import
indoor_eval
from
mmdet3d.core.evaluation.indoor_eval
import
average_precision
,
indoor_eval
def
test_indoor_eval
():
...
...
@@ -241,3 +241,11 @@ def test_indoor_eval():
assert
table_rec_50
==
0.5
assert
chair_rec_50
==
0.125
assert
abs
(
mAR_50
-
0.160714
)
<
0.001
def
test_average_precision
():
ap
=
average_precision
(
np
.
array
([[
0.25
,
0.5
,
0.75
],
[
0.25
,
0.5
,
0.75
]]),
np
.
array
([[
1.
,
1.
,
1.
],
[
1.
,
1.
,
1.
]]),
'11points'
)
print
(
ap
[
0
])
assert
abs
(
ap
[
0
]
-
0.06611571
)
<
0.001
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