-
Notifications
You must be signed in to change notification settings - Fork 54
/
Copy pathdemo_sds.m
28 lines (20 loc) · 826 Bytes
/
demo_sds.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
function demo_sds
imname='2010_002211';
imgdir=pwd;
cachedir=fullfile(pwd, 'cachedir');
imgfile=fullfile(imgdir, [imname '.jpg']);
img=imread(imgfile);
if(~exist(cachedir, 'file')) mkdir(cachedir); end
mcgdir=fullfile(cachedir, 'mcg');
ovoutdir=fullfile(cachedir, 'overlaps');
sptextdir=fullfile(cachedir, 'sptextdir');
regspimgdir=fullfile(cachedir, 'reg2spimgdir');
featdir=fullfile(cachedir, 'featdir');
refinedoutdir=fullfile(cachedir, 'refinement_out');
scorefile=fullfile(cachedir, 'scores.mat');
imagelist_to_sds({imname}, imgdir, mcgdir, ovoutdir, sptextdir, regspimgdir, featdir, refinedoutdir, scorefile,10);
tmp=load(scorefile);
chosen=tmp.topchosen;
chosenscores=tmp.topscores;
%visualize the top detections
visualize_sds({imname}, imgdir, sptextdir, regspimgdir, chosen, chosenscores, 15, refinedoutdir);