-
Notifications
You must be signed in to change notification settings - Fork 59
/
install.m
55 lines (50 loc) · 2.38 KB
/
install.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
% ------------------------------------------------------------------------
% Copyright (C)
% ETH Zurich - Switzerland
%
% Kevis-Kokitsi Maninis <[email protected]>
% Jordi Pont-Tuset <[email protected]>
% July 2016
% ------------------------------------------------------------------------
% This file is part of the COB package presented in:
% K.K. Maninis, J. Pont-Tuset, P. Arbelaez and L. Van Gool
% Convolutional Oriented Boundaries
% European Conference on Computer Vision (ECCV), 2016
% Please consider citing the paper if you use this code.
% ------------------------------------------------------------------------
% Check that 'cob_root' has been set
if ~exist(cob_root,'dir')
error('Error installing the package, try updating the value of cob_root in the file "cob_root.m"')
end
% Check that 'cob_root' has the needed folder
if ~exist(fullfile(cob_root,'lib'),'dir')
error('Error installing the package, the folder "lib" not found, have you compiled it? See build.m')
end
if ~exist(fullfile(cob_root,'src'),'dir')
error('Error installing the package, the folder "src" not found')
end
% Install own lib
addpath(cob_root);
addpath(fullfile(cob_root,'lib'));
addpath(fullfile(cob_root,'scripts'));
addpath(genpath(fullfile(cob_root,'src')));
%% Check that the needed functions are compiled
% Included in our code
needed_files = {'mex_assess_one_sel','mex_base_perimeters','mex_fast_features',...
'mex_fast_intersections', 'mex_fast_reduction', 'mex_box_reduction',...
'mex_get_tree_cands', 'mex_prune_tree_to_regions',...
'mex_max_margin', 'mex_hole_filling',...
'mex_intersect_hierarchies','mex_cands2masks','mex_cands2labels','mex_ucm2hier',...
'paretofront',... % Included from paretofront
'mexRF_train', 'mexRF_predict',... % Included from RF_Reg_C
'convConst','gradientMex','imPadMex','imResampleMex','rgbConvertMex',... % Included from piotr_toolbox
'buildW', 'mex_contour_sides', 'ucm_mean_pb',... % Included from BSR
};
for ii=1:length(needed_files)
if exist(needed_files{ii})~=3 %#ok<EXIST>
error(['The needed function (' needed_files{ii} ') not found. Have you built the package properly?'])
end
end
%% Clear
clear ii needed_files;
disp('-- Successful installation of COB. Enjoy! --');