"tools/python/vscode:/vscode.git/clone" did not exist on "a18e72e51685e0306f889642da15ff7994362dc3"
Commit fee31738 authored by liyinhao's avatar liyinhao
Browse files

add test_average_precision

parent 62565405
import numpy as np 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(): def test_indoor_eval():
...@@ -241,3 +241,11 @@ def test_indoor_eval(): ...@@ -241,3 +241,11 @@ def test_indoor_eval():
assert table_rec_50 == 0.5 assert table_rec_50 == 0.5
assert chair_rec_50 == 0.125 assert chair_rec_50 == 0.125
assert abs(mAR_50 - 0.160714) < 0.001 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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment