-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathstartup.m
71 lines (61 loc) · 3.16 KB
/
startup.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
63
64
65
66
67
68
69
70
71
function startup()
% startup()
% modified version of external/faster_rcnn startup.m
curdir = fileparts(mfilename('fullpath'));
addpath(fullfile(curdir, 'external', 'hglmm_fv','fv'));
addpath(fullfile(curdir, 'external', 'hglmm_fv','utilities'));
addpath(fullfile(curdir, 'external', 'hglmm_fv','FastICA_25'));
if ispc
addpath(fullfile(curdir, 'external', 'hglmm_fv','fv', 'HGLMM_win'));
addpath(fullfile(curdir, 'external', 'hglmm_fv','fv', 'LMM_win'));
else
addpath(fullfile(curdir, 'external', 'hglmm_fv','fv', 'HGLMM_linux'));
addpath(fullfile(curdir, 'external', 'hglmm_fv','fv', 'LMM_linux'));
end
addpath(genpath(fullfile(curdir, 'external', 'hglmm_fv', 'cca')));
run(fullfile(curdir,'external','hglmm_fv','vlfeat-0.9.18','toolbox','vl_setup'));
% Force matlab to load the mex file to get around TLS loading bug.
% May only work when matlab's GUI isn't loaded on startup.
try
encoding = HybridFV(0, 0, 0, 0, 0, 0, 0, 0);
catch ME
if strcmp(ME.identifier,'MATLAB:invalidMEXFile')
warning(['Error loading fisher vector code. Try loading matlab'...
' without the GUI if you want to use the CCA model.']);
else
rethrow(ME);
end
end
addpath(genpath(fullfile(curdir, 'datasets', 'Flickr30kEntities')));
addpath(genpath(fullfile(curdir, 'parsing')));
addpath(genpath(fullfile(curdir, 'unaryCues')));
addpath(genpath(fullfile(curdir, 'pairwiseCues')));
addpath(genpath(fullfile(curdir, 'imdb')));
addpath(genpath(fullfile(curdir, 'cueSupport')));
addpath(genpath(fullfile(curdir, 'interfaces')));
addpath(genpath(fullfile(curdir, 'utilities')));
addpath(genpath(fullfile(curdir, 'trainScripts')));
addpath(fullfile(curdir, 'external'));
addpath(genpath(fullfile(curdir, 'external', 'faster_rcnn', 'utils')));
addpath(genpath(fullfile(curdir, 'external', 'faster_rcnn', 'functions')));
addpath(genpath(fullfile(curdir, 'external', 'faster_rcnn', 'bin')));
addpath(genpath(fullfile(curdir, 'external', 'faster_rcnn', 'experiments')));
addpath(genpath(fullfile(curdir, 'external', 'faster_rcnn', 'imdb')));
addpath(genpath(fullfile(curdir, 'external', 'faster_rcnn', 'fetch_data')));
addpath(genpath(fullfile(curdir, 'external', 'libsvm', 'matlab')));
addpath(genpath(fullfile(curdir, 'external', 'edges')));
addpath(genpath(fullfile(curdir, 'external', 'toolbox')));
mkdir_if_missing(fullfile(curdir, 'external', 'faster_rcnn', 'datasets'));
mkdir_if_missing(fullfile(curdir, 'external', 'faster_rcnn', 'external'));
caffe_path = fullfile(curdir, 'external', 'faster_rcnn', 'external', 'caffe', 'matlab');
if exist(caffe_path, 'dir') == 0
error('matcaffe is missing from external/caffe/matlab; See faster_rcnn README.md');
end
addpath(genpath(caffe_path));
mkdir_if_missing(fullfile(curdir, 'imdb', 'cache'));
mkdir_if_missing(fullfile(curdir, 'output'));
mkdir_if_missing(fullfile(curdir, 'models'));
mkdir_if_missing(fullfile(curdir, 'data'));
mkdir_if_missing(fullfile(curdir, 'datasets'));
fprintf('pl-clc startup done\n');
end