forked from nazikus/dalcim
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcoseg_example.m
More file actions
52 lines (29 loc) · 1.06 KB
/
coseg_example.m
File metadata and controls
52 lines (29 loc) · 1.06 KB
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
% Show an example from MSRC database for cosegmentation
profile on -history;
clear all
warning off
dirName = fileparts(mfilename('fullpath'));
addpath(genpath(dirName));
cd(dirName);
rand('seed',1);
randn('seed',1);
%%%% PARAMETERS
nPics = 5; %nb of pics
nClass = 2; % nb of class(es)
typeObj ='sift';
lapWght = 1e-1; % binary paremeter (\mu in the article)
typeKernel = 'chi2';% 'chi2' or 'Hellsinger'
typeFeat = 'sift';% 'color' or 'sift'
param.onlyDiffrac = 0; % if 1 , then only the CVPR'10
param.initDiffrac = 1; % if 1, init by CVPR'10
itMax = 1; % nb of random init
param.reboot = 1; % to recompute everything
param.ViewOn = 1; % to look at results
param.useMask = 0; % = 1 for grabcut
%%%% Run Coseg algorithm
run_coseg;
% profile viewer
stats = profile('info');
[~, mdir, ~] = fileparts(pwd);
save(sprintf('../%s_Docs/%s_profile_data.mat', mdir, mfilename), 'stats');
profsave(stats,sprintf('../%s_Docs/%s_profile_results',mdir, mfilename));