forked from bochinski/iou-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_tracker.m
40 lines (34 loc) · 877 Bytes
/
run_tracker.m
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
33
34
35
36
37
38
39
40
function [stateInfo, speed] = run_tracker(curSequence, baselinedetections)
%% tracker configuration
%% R-CNN
sigma_l = 0;
sigma_h = 0.7;
sigma_iou = 0.5;
t_min = 2;
% %% ACF
% sigma_l = 0;
% sigma_h = 0.3;
% sigma_iou = 0.5;
% t_min = 3;
% %% CompACT
% sigma_l = 0;
% sigma_h = 0.2;
% sigma_iou = 0.5;
% t_min = 2;
% %% EB
% sigma_l = 0;
% sigma_h = 0.8;
% sigma_iou = 0.5;
% t_min = 2;
%% running tracking algorithm
try
ret = py.iou_tracker.track_iou_matlab_wrapper(py.numpy.array(baselinedetections(:).'), sigma_l, sigma_h, sigma_iou, t_min);
catch exception
disp('error while calling the python tracking module: ')
disp(' ')
disp(getReport(exception))
end
speed = ret{1};
track_result = cell2mat(reshape(ret{2}.cell.', 6, []).');
%% convert and save the mot style track_result
stateInfo = saveStateInfo(track_result, numel(curSequence.frameNums));