-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdemo.m
36 lines (29 loc) · 1.01 KB
/
demo.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
% Script that gives a demo of the saliency method presented in
% Saliency-Aware Geodesic Video Object Segmentation CVPR2015
% Contact: [email protected] or [email protected]
clc
clear
options.valScale = 60;
options.alpha = 0.02;
options.salScale = 0.1;
options.color_size = 5;
% Print status messages on screen
options.vocal = true;
options.regnum =500;
options.m = 20;
options.topRate = 0.01;
options.gradLambda = 1;
addpath( genpath( '.' ) );
foldername = fileparts( mfilename( 'fullpath' ) );
videoFiles = dir(fullfile(foldername, 'data', 'inputs'));
videoNUM = length(videoFiles)-2;
for videonum = 1:videoNUM
videofolder = videoFiles(videonum+2).name;
if( options.vocal )
disp( ['Processing:', videoFiles(videonum+2).name]);
end
options.infolder = fullfile( foldername, 'data', 'inputs',videofolder );
options.outfolder = fullfile( foldername, 'data', 'outputs', videofolder );
%Getting final saliency results
sal{videonum} = computeSaliency(options);
end