Skip to content

Commit

Permalink
Merge branch 'dt' of github.com:quantombone/exemplarsvm into dt
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomasz J Malisiewicz committed Mar 5, 2012
2 parents 5d62deb + 76d9f50 commit 996faf5
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
11 changes: 8 additions & 3 deletions applyModel.m
Expand Up @@ -18,8 +18,9 @@
test_params.detect_max_windows_per_exemplar = 200;
test_params.detect_keep_threshold = -1.5;
test_params.calibrate_nms = 1.0;

if length(data_set) == 0
data_set = get_screenshot_bg(50,@(x)imresize_max(x,400));
data_set = get_screenshot_bg(5000,@(x)imresize_max(x,400));
%data_set = get_screenshot_bg(20);
test_params.display_detections = 1;
%test_params.write_top_detection = 1;
Expand All @@ -34,13 +35,16 @@
test_params.display_detections = 1;
end


if isnumeric(data_set) && ...
size(data_set,4) == 1 && ...
size(data_set,3) == 3
data_set = {data_set};

%Given a single image
boxes = esvm_detect_imageset(data_set, model, test_params, test_set_name);
boxes = esvm_detect_imageset(data_set, model, test_params, ...
test_set_name);

elseif isnumeric(data_set) && ...
size(data_set,4) > 1 && ...
size(data_set, 3)==3
Expand All @@ -55,7 +59,8 @@
end
else
%% Apply on test set
boxes = esvm_detect_imageset(data_set, model, test_params, test_set_name);
boxes = esvm_detect_imageset(data_set, model, test_params, ...
test_set_name);
end


Expand Down
5 changes: 4 additions & 1 deletion internal/esvm_detect.m
Expand Up @@ -202,7 +202,6 @@


t = get_pyramid(I, sbin, params);

resstruct.padder = t.padder;
resstruct.bbs = cell(N,1);
xs = cell(N,1);
Expand Down Expand Up @@ -550,6 +549,10 @@
else
t = I{1};
end
elseif length(I)==2 && params.detect_add_flip==1
t =I(2);
elseif length(I)==2 && params.detect_add_flip==0
t = I(1);
else
t = I;
end
Expand Down
2 changes: 1 addition & 1 deletion internal/esvm_get_default_params.m
Expand Up @@ -219,7 +219,7 @@
%Information about where we mine images from
params.mine_from_negatives = 1;
params.mine_from_positives = 0;

params.mine_from_positives_do_latent_update = 1;
% If enabled, skips objects durning mining when mining from positives
params.mine_skip_positive_objects = 1;

Expand Down
2 changes: 1 addition & 1 deletion libsvm/libsvm_compile.m
Expand Up @@ -5,6 +5,6 @@
mex -largeArrayDims -O libsvmtrain.c svm.o svm_model_matlab.o

%These files are not used
%mex -O svmpredict.c svm.obj svm_model_matlab.obj
mex -O libsvmpredict.c svm.o svm_model_matlab.o
%mex -O libsvmread.c
%mex -O libsvmwrite.c
Binary file added libsvm/libsvmpredict.mexmaci64
Binary file not shown.

0 comments on commit 996faf5

Please sign in to comment.