mot-metrics / tests.py
VascoDVRodrigues
1st commit
40c6d5b
import numpy as np
test_cases = [
{
"predictions": [np.array(a) for a in [
[1,1,10,20,30,40,0.85],
[1,2,50,60,70,80,0.92],
[1,3,80,90,100,110,0.75],
[2,1,15,25,35,45,0.78],
[2,2,55,65,75,85,0.95],
[3,1,20,30,40,50,0.88],
[3,2,60,70,80,90,0.82],
[4,1,25,35,45,55,0.91],
[4,2,65,75,85,95,0.89]
]],
"references": [np.array(a) for a in [
[1, 1, 10, 20, 30, 40],
[1, 2, 50, 60, 70, 80],
[1, 3, 85, 95, 105, 115],
[2, 1, 15, 25, 35, 45],
[2, 2, 55, 65, 75, 85],
[3, 1, 20, 30, 40, 50],
[3, 2, 60, 70, 80, 90],
[4, 1, 25, 35, 45, 55],
[5, 1, 30, 40, 50, 60],
[5, 2, 70, 80, 90, 100]
]],
"result": {'idf1': 0.8421052631578947, 'idp': 0.8888888888888888,
'idr': 0.8, 'recall': 0.8, 'precision': 0.8888888888888888,
'num_unique_objects': 3,'mostly_tracked': 2,
'partially_tracked': 1, 'mostly_lost': 0,
'num_false_positives': 1, 'num_misses': 2,
'num_switches': 0, 'num_fragmentations': 0,
'mota': 0.7, 'motp': 0.02981870229007634,
'num_transfer': 0, 'num_ascend': 0,
'num_migrate': 0}
},
]