-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathevalAllCuesFlickr30K.m
23 lines (19 loc) · 1.01 KB
/
evalAllCuesFlickr30K.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
% Example script which evaluates the phrase localization task using the cues
% from our paper.
conf = plClcConfig;
load(conf.testData,'imData');
[spc,updateBoxes] = singlePhraseCueSet(conf);
[imData,scores,boxes] = getSPCScores(conf,imData,spc,updateBoxes);
load(conf.spcWeights,'weights');
addGT = false;
scores = scoreRegionsWithSinglePhraseCues(conf,imData,weights,scores,boxes,addGT);
ppc = pairPhraseCueSet(conf);
load(conf.ppcWeights,'weights');
selectedCandidates = refineCandidatesWithPairPhraseCues(conf,imData,weights,ppc,scores);
% comment out the following line and uncomment the one with more
% arguments for detailed evaluation
[acc,oracle] = flickrPhraseLocalizationEval(imData,boxes,selectedCandidates,conf.posThresh);
detailedEvalFN = 'test_all_cue.csv';
phraseTypes = conf.phraseTypes(~strcmp('notvisual',conf.phraseTypes));
%[acc,oracle] = flickrPhraseLocalizationEval(imData,boxes,selectedCandidates,conf.posThresh,spc,ppc,detailedEvalFN,phraseTypes);
fprintf('Accuracy: %f Upper Bound: %f\n',acc,oracle);