-
Notifications
You must be signed in to change notification settings - Fork 0
/
eval.py
32 lines (20 loc) · 796 Bytes
/
eval.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import subprocess
import argparse
__author__ = "Yudong Zhang"
def parse_args_():
parser = argparse.ArgumentParser()
parser.add_argument('--GTxmlpath', type=str, default='dataset/ground_truth/MICROTUBULE snr 7 density mid.xml')
parser.add_argument('--pred_xmlpath', type=str, default='dataset/ground_truth/MICROTUBULE snr 7 density mid.xml')
opt = parser.parse_args()
return opt
if __name__ == '__main__':
opt = parse_args_()
# prepare gt path, result path, and output path
ref = opt.GTxmlpath
can = opt.pred_xmlpath
out = can.replace('.xml','.txt')
subprocess.call(
['java', '-jar', 'trackingPerformanceEvaluation.jar',
'-r', ref, '-c', can,'-o',out])
print('[Info] Finish evaluating')
print(f'Save file:{out}')