forked from ShaoqingRen/SPP_net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
spp_build.m
85 lines (73 loc) · 2.87 KB
/
spp_build.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
72
73
74
75
76
77
78
79
80
81
82
83
84
function spp_build()
% Compile Selective Search. Code modified from the Selective Search IJCV release.
%
% Compile anisotropic gaussian filter
if ~exist('anigauss')
fprintf('Compiling the anisotropic gauss filtering of:\n');
fprintf(' J. Geusebroek, A. Smeulders, and J. van de Weijer\n');
fprintf(' Fast anisotropic gauss filtering\n');
fprintf(' IEEE Transactions on Image Processing, 2003\n');
fprintf('Source code/Project page:\n');
fprintf(' http://staff.science.uva.nl/~mark/downloads.html#anigauss\n\n');
mex -outdir bin ...
selective_search/SelectiveSearchCodeIJCV/Dependencies/anigaussm/anigauss_mex.c ...
selective_search/SelectiveSearchCodeIJCV/Dependencies/anigaussm/anigauss.c ...
-output anigauss
end
if ~exist('mexCountWordsIndex')
mex -outdir bin ...
selective_search/SelectiveSearchCodeIJCV/Dependencies/mexCountWordsIndex.cpp ...
-output mexCountWordsIndex
end
% Compile the code of Felzenszwalb and Huttenlocher, IJCV 2004.
if ~exist('mexFelzenSegmentIndex')
fprintf('Compiling the segmentation algorithm of:\n');
fprintf(' P. Felzenszwalb and D. Huttenlocher\n');
fprintf(' Efficient Graph-Based Image Segmentation\n');
fprintf(' International Journal of Computer Vision, 2004\n');
fprintf('Source code/Project page:\n');
fprintf(' http://www.cs.brown.edu/~pff/segment/\n');
fprintf('Note: A small Matlab wrapper was made.\n');
mex -outdir bin ...
selective_search/SelectiveSearchCodeIJCV/Dependencies/FelzenSegment/mexFelzenSegmentIndex.cpp ...
-output mexFelzenSegmentIndex;
end
% Compile liblinear
if ~exist('liblinear_train')
fprintf('Compiling liblinear version 1.93\n');
fprintf('Source code page:\n');
fprintf(' http://www.csie.ntu.edu.tw/~cjlin/liblinear/\n');
mex -outdir bin ...
COMPFLAGS="$COMPFLAGS /openmp" -largeArrayDims ...
external/liblinear-1.93_multicore/matlab/train.cpp ...
external/liblinear-1.93_multicore/matlab/linear_model_matlab.cpp ...
external/liblinear-1.93_multicore/linear.cpp ...
external/liblinear-1.93_multicore/tron.cpp ...
"external/liblinear-1.93_multicore/blas/*.c" ...
-output liblinear_train;
end
% Compile spm_pool_caffe_mex
if ~exist('spm_pool_caffe_mex')
fprintf('Compiling spm_pool_caffe_mex\n');
mex -outdir bin ...
-largeArrayDims ...
utils/spm_pool/spm_pool_caffe_mex.cpp ...
-output spm_pool_caffe_mex;
end
% Compile nms_mex
if ~exist('nms_mex')
fprintf('Compiling nms_mex\n');
mex -outdir bin ...
-largeArrayDims ...
nms/nms_mex.cpp ...
-output nms_mex;
end
% Compile nms_multiclass_mex
if ~exist('nms_multiclass_mex')
fprintf('Compiling nms_multiclass_mex\n');
mex -outdir bin ...
COMPFLAGS="$COMPFLAGS /openmp" ...
-largeArrayDims ...
nms/nms_multiclass_mex.cpp ...
-output nms_multiclass_mex;
end