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
62565405
"docs/git@developer.sourcefind.cn:change/sglang.git" did not exist on "b54b5a96e4e94e2bd5b7e18bb006a96fe85bfef5"
Commit
62565405
authored
May 16, 2020
by
liyinhao
Browse files
change test_indoor_eval data
parent
d7f69840
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
112 additions
and
65 deletions
+112
-65
tests/test_dataset/test_indoor_eval.py
tests/test_dataset/test_indoor_eval.py
+112
-65
No files found.
tests/test_dataset/test_indoor_eval.py
View file @
62565405
import
numpy
as
np
import
numpy
as
np
import
torch
from
mmdet3d.core.evaluation.indoor_eval
import
indoor_eval
from
mmdet3d.core.evaluation.indoor_eval
import
indoor_eval
def
test_indoor_eval
():
def
test_indoor_eval
():
det_infos
=
[[[[
det_infos
=
[[[[
17
.0
,
4
.0
,
[
[
3.2112048e+00
,
5.6918913e-01
,
-
8.6143613e-04
,
1.1942449e-01
,
2.8734498
,
-
0.187645
,
-
0.02600911
,
0.6761766
,
0.56542563
,
1.2988183e+00
,
1.9952521e-01
,
0.0000000e+00
0.5953976
,
0.
],
],
0.9980684
torch
.
as_tensor
(
0.9965866
)
],
],
[
[
17
.0
,
4
.0
,
[
[
3.248133
,
0.4324184
,
0.20038621
,
0.17225507
,
0.4031701
,
-
3.2346897
,
0.07118589
,
0.73209894
,
1.2736976
,
0.32598814
,
0.
0.8711227
,
0.5148243
,
0.
],
],
0.9747082
torch
.
as_tensor
(
0.99507546
)
],
],
[
[
3.0
,
3.0
,
[
[
-
1.2793612
,
-
2.3155289
,
0.15598366
,
1.2822601
,
-
1.274147
,
-
2.351935
,
0.07428858
,
1.4534658
,
2.2253945
,
0.8361754
,
0.
2.563081
,
0.8587492
,
0.
],
],
0.9709939
torch
.
as_tensor
(
0.9916463
)
],
[
4.0
,
[
2.8716104
,
-
0.26416883
,
-
0.04933786
,
0.8190681
,
0.60294986
,
0.5769499
,
0.
],
torch
.
as_tensor
(
0.9702634
)
],
],
[
[
17.0
,
17.0
,
[
[
-
2.2109854
,
0.19445783
,
-
0.01614259
,
0.40659013
,
3.2214177
,
0.7899204
,
0.03836718
,
0.05321002
,
0.35370222
,
0.3290567
,
0.
1.2607929
,
0.1411697
,
0.
],
],
0.9482147
torch
.
as_tensor
(
0.95803124
)
],
],
[
[
4
.0
,
2
.0
,
[
[
0.18409574
,
-
3.3322976
,
0.13188198
,
0.960528
,
-
1.6804854
,
2.399011
,
-
0.13099639
,
0.5608963
,
0.91082716
,
0.59325826
,
0.
0.5052759
,
0.6770297
,
0.
],
],
0.84311247
torch
.
as_tensor
(
0.9483817
)
]]],
],
[[[
17.0
,
[
3.2112048e+00
,
5.6918913e-01
,
-
8.6143613e-04
,
1.1942449e-01
,
1.2988183e+00
,
1.9952521e-01
,
0.0000000e+00
],
0.9965866
],
[
[
17.0
,
17.0
,
[
[
1.9499326
,
2.0099056
,
0.32836294
,
0.98528206
,
3.248133
,
0.4324184
,
0.20038621
,
0.17225507
,
1.0611539
,
1.2197046
,
0.
1.2736976
,
0.32598814
,
0.
],
],
0.99507546
torch
.
as_tensor
(
0.92196786
)
],
],
[
[
2
.0
,
3
.0
,
[
[
-
1.6204697
,
2.3374724
,
0.06042781
,
0.49681002
,
-
1.2793612
,
-
2.3155289
,
0.15598366
,
1.2822601
,
0.44362187
,
0.47277915
,
0.
2.2253945
,
0.8361754
,
0.
],
],
0.9916463
torch
.
as_tensor
(
0.87960094
)
],
],
[
[
17
.0
,
4
.0
,
[
[
2.1414487
,
-
1.7601899
,
0.17694443
,
1.0071366
,
2.8716104
,
-
0.26416883
,
-
0.04933786
,
0.8190681
,
2.211764
,
1.4690719
,
0.
0.60294986
,
0.5769499
,
0.
],
],
0.9702634
torch
.
as_tensor
(
0.8586809
)
],
],
[
[
17.0
,
17.0
,
[
[
-
0.0484907
,
-
3.639972
,
0.41367513
,
3.948648
,
-
2.2109854
,
0.19445783
,
-
0.01614259
,
0.40659013
,
1.3692774
,
1.0810001
,
0.
0.35370222
,
0.3290567
,
0.
],
],
0.95803124
torch
.
as_tensor
(
0.80680436
)
]]]]
]]]]
label2cat
=
{
label2cat
=
{
...
@@ -109,10 +99,59 @@ def test_indoor_eval():
...
@@ -109,10 +99,59 @@ def test_indoor_eval():
gt_annos
=
[{
gt_annos
=
[{
'gt_num'
:
'gt_num'
:
12
,
12
,
'name'
:
[
'gt_boxes_upright_depth'
:
'table'
,
'curtain'
,
'sofa'
,
'bookshelf'
,
'picture'
,
'chair'
,
np
.
array
([[
'chair'
,
'garbagebin'
,
'table'
,
'chair'
,
'chair'
,
'garbagebin'
2.54621506
,
-
0.89397144
,
0.54144311
,
2.90430856
,
1.78370309
,
0.93826824
],
],
[
3.36553669
,
0.31014189
,
0.38758934
,
1.2504847
,
0.71281439
,
0.3908577
],
[
0.17272574
,
2.90289116
,
0.27966365
,
0.56292468
,
0.8512187
,
0.4987641
],
[
2.39521956
,
1.67557895
,
0.40407273
,
1.23511314
,
0.49469376
,
0.62720448
],
[
-
2.41815996
,
-
1.69104958
,
0.22304082
,
0.55816364
,
0.48154473
,
0.66580439
],
[
-
0.18044823
,
2.9227581
,
0.24480903
,
0.36165208
,
0.44468427
,
0.53103662
],
[
-
2.44398379
,
-
2.1610918
,
0.23631772
,
0.52229881
,
0.63388562
,
0.66596919
],
[
-
2.01452827
,
-
2.9558928
,
0.8139953
,
1.61732554
,
0.60224247
,
1.79295814
],
[
-
0.61519569
,
3.24365234
,
1.24335742
,
2.11988783
,
0.26006722
,
1.77748263
],
[
-
2.64330673
,
0.59929442
,
1.59422684
,
0.07352924
,
0.28620502
,
0.35408139
],
[
-
0.58128822
,
3.23699641
,
0.06050609
,
1.94151425
,
0.16413498
,
0.20168215
],
[
0.15343043
,
2.24693251
,
0.22470728
,
0.49632657
,
0.47379827
,
0.43063563
]]),
'class'
:
[
3
,
4
,
4
,
17
,
2
,
2
,
2
,
7
,
11
,
8
,
17
,
2
]
},
{
'gt_num'
:
12
,
'gt_boxes_upright_depth'
:
'gt_boxes_upright_depth'
:
np
.
array
([[
np
.
array
([[
3.48649406
,
0.24238291
,
0.48358256
,
1.34014034
,
0.72744983
,
3.48649406
,
0.24238291
,
0.48358256
,
1.34014034
,
0.72744983
,
...
@@ -176,21 +215,29 @@ def test_indoor_eval():
...
@@ -176,21 +215,29 @@ def test_indoor_eval():
table_rec_25
=
ret_value
[
'table_rec_0.25'
]
table_rec_25
=
ret_value
[
'table_rec_0.25'
]
chair_rec_25
=
ret_value
[
'chair_rec_0.25'
]
chair_rec_25
=
ret_value
[
'chair_rec_0.25'
]
mAR_25
=
ret_value
[
'mAR_0.25'
]
mAR_25
=
ret_value
[
'mAR_0.25'
]
sofa_AP_50
=
ret_value
[
'sofa_AP_0.50'
]
table_AP_50
=
ret_value
[
'table_AP_0.50'
]
table_AP_50
=
ret_value
[
'table_AP_0.50'
]
chair_AP_50
=
ret_value
[
'chair_AP_0.50'
]
mAP_50
=
ret_value
[
'mAP_0.50'
]
mAP_50
=
ret_value
[
'mAP_0.50'
]
sofa_rec_50
=
ret_value
[
'sofa_rec_0.50'
]
table_rec_50
=
ret_value
[
'table_rec_0.50'
]
table_rec_50
=
ret_value
[
'table_rec_0.50'
]
chair_rec_50
=
ret_value
[
'chair_rec_0.50'
]
mAR_50
=
ret_value
[
'mAR_0.50'
]
mAR_50
=
ret_value
[
'mAR_0.50'
]
assert
garbagebin_AP_25
==
0.5
assert
garbagebin_AP_25
==
0.
2
5
assert
sofa_AP_25
==
1.0
assert
sofa_AP_25
==
1.0
assert
table_AP_25
==
1.0
assert
table_AP_25
==
0.75
assert
chair_AP_25
==
0.25
assert
chair_AP_25
==
0.
1
25
assert
abs
(
mAP_25
-
0.3
928
57
)
<
0.001
assert
abs
(
mAP_25
-
0.3
03
57
1
)
<
0.001
assert
garbagebin_rec_25
==
0.5
assert
garbagebin_rec_25
==
0.
2
5
assert
sofa_rec_25
==
1.0
assert
sofa_rec_25
==
1.0
assert
table_rec_25
==
1.0
assert
table_rec_25
==
0.75
assert
chair_rec_25
==
0.25
assert
chair_rec_25
==
0.125
assert
abs
(
mAR_25
-
0.392857
)
<
0.001
assert
abs
(
mAR_25
-
0.303571
)
<
0.001
assert
table_AP_50
==
0.5
assert
sofa_AP_50
==
0.25
assert
abs
(
mAP_50
-
0.0714
)
<
0.001
assert
abs
(
table_AP_50
-
0.416667
)
<
0.001
assert
chair_AP_50
==
0.125
assert
abs
(
mAP_50
-
0.113095
)
<
0.001
assert
sofa_rec_50
==
0.5
assert
table_rec_50
==
0.5
assert
table_rec_50
==
0.5
assert
abs
(
mAR_50
-
0.0714
)
<
0.001
assert
chair_rec_50
==
0.125
assert
abs
(
mAR_50
-
0.160714
)
<
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