forked from jwlim/tracker_benchmark
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathrun_BSBT.py
More file actions
31 lines (24 loc) · 796 Bytes
/
run_BSBT.py
File metadata and controls
31 lines (24 loc) · 796 Bytes
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
import subprocess
import time
import numpy as np
from config import *
def run_BSBT(seq, rp, bSaveImage):
x = seq.init_rect[0] - 1
y = seq.init_rect[1] - 1
w = seq.init_rect[2]
h = seq.init_rect[3]
path = './results/'
if not os.path.exists(path):
os.makedirs(path)
command = list(map(str,['BeyondSemiBoostingTracker.exe', '100', '0.99', '2',
'0', '0', '0', seq.name, seq.path, seq.startFrame, seq.endFrame,
seq.nz, seq.ext, x, y, w, h]))
tic = time.clock()
subprocess.call(command)
duration = time.clock() - tic
result = dict()
res = np.loadtxt('{0}_BSBT.txt'.format(seq.name), dtype=int)
result['res'] = res.tolist()
result['type'] = 'rect'
result['fps'] = round(seq.len / duration, 3)
return result