forked from votchallenge/toolkit-legacy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
vot_initialize.m
62 lines (43 loc) · 2.24 KB
/
vot_initialize.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
function vot_initialize()
% Initialize a new VOT workspace
script_directory = fileparts(mfilename('fullpath'));
include_dirs = cellfun(@(x) fullfile(script_directory,x), ...
{'utilities', 'tracker'}, 'UniformOutput', false);
addpath(include_dirs{:});
initialize_defaults;
directory = pwd();
% Check if the directory is already a valid VOT workspace ...
configuration_file = fullfile(directory, 'configuration.m');
if exist(configuration_file, 'file')
error('Directory is probably already a VOT workspace.');
end;
% Copy configuration templates ...
templates = fullfile(script_directory, 'templates');
info = vot_information();
tracker_identifier = input('Input an unique identifier for your tracker: ', 's');
if ~valid_identifier(tracker_identifier)
error('Not a valid tracker identifier!');
end;
generate_from_template(fullfile(directory, 'configuration.m'), ...
fullfile(templates, 'configuration.tpl'), 'version', num2str(info.version));
generate_from_template(fullfile(directory, 'run_experiments.m'), ...
fullfile(templates, 'run_experiments.tpl'), 'tracker', tracker_identifier);
generate_from_template(fullfile(directory, 'run_test.m'), ...
fullfile(templates, 'run_test.tpl'), 'tracker', tracker_identifier);
generate_from_template(fullfile(directory, 'run_browse.m'), ...
fullfile(templates, 'run_browse.tpl'), 'tracker', tracker_identifier);
generate_from_template(fullfile(directory, 'run_analysis.m'), ...
fullfile(templates, 'run_analysis.tpl'), 'tracker', tracker_identifier);
generate_from_template(fullfile(directory, ['tracker_', tracker_identifier, '.m']), ...
fullfile(templates, 'tracker.tpl'), 'tracker', tracker_identifier);
% Print further instructions ...
print_text('');
print_text('***************************************************************************');
print_text('');
print_text('The VOT workspace has been configured');
print_text('Please edit the tracker_%s.m file to configure your tracker.', tracker_identifier);
print_text('Then run run_test.m script to make sure that the tracker is working.');
print_text('To run the experiments execute the run_experiments.m script.');
print_text('');
print_text('***************************************************************************');
print_text('');