-
Notifications
You must be signed in to change notification settings - Fork 80
/
setup.m
43 lines (36 loc) · 1.49 KB
/
setup.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
function setup( matconvnetPath )
%setup adds all the paths required by this package
%
% setup( matconvnetPath )
%
% Input:
% matconvnetPath - path to the root of MatConvNet
rootDir = fileparts( mfilename( 'fullpath' ) );
% setup MatConvNet
if exist('vl_setupnn.m', 'file')
vl_setupnn;
else
if ~exist( 'matconvnetPath', 'var' )
warning('MatConvNet path is not provided. Not all functionality is available. Run setup( matconvnetPath ) where matconvnetPath is the path to the MatConvNet installation.')
else
run( fullfile(matconvnetPath, 'matlab', 'vl_setupnn.m') );
end
end
% helper functions
addpath( fullfile(rootDir, 'utils') );
addpath( fullfile(rootDir, 'utils', 'cropRectanglesMex') );
addpath( fullfile(rootDir, 'utils', 'VOCcode') );
addpath( fullfile(rootDir, 'utils', 'HollywoodHeads') );
addpath( fullfile(rootDir, 'utils', 'Casablanca') );
% code for the local model
addpath( fullfile(rootDir, 'localModel') );
% code for the pairwise model
addpath( fullfile(rootDir, 'pairwiseModel') );
addpath( fullfile(rootDir, 'pairwiseModel', 'computeMinMarginalsBinaryMex' ) );
addpath( fullfile(rootDir, 'pairwiseModel', 'energyMinimization' ) );
addpath( fullfile(rootDir, 'pairwiseModel', 'energyMinimization', 'bruteForceBinaryPairwiseMex' ) );
addpath( fullfile(rootDir, 'pairwiseModel', 'energyMinimization', 'qpboMex' ) );
addpath( fullfile(rootDir, 'pairwiseModel', 'energyMinimization', 'trwsMex' ) );
% code for the global model
addpath( fullfile(rootDir, 'globalModel') );
end