forked from rbgirshick/voc-dpm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathauc_ap_2007.m
30 lines (27 loc) · 954 Bytes
/
auc_ap_2007.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
function auc_ap_2007(path, suffix)
% Load precision and recall from [path cls suffix] and recompute
% AP scores using the >= 2010 area under curve method. Useful for
% getting less noisy results on the 2007 test set.
% AUTORIGHTS
% -------------------------------------------------------
% Copyright (C) 2009-2012 Ross Girshick
%
% This file is part of the voc-releaseX code
% (http://people.cs.uchicago.edu/~rbg/latent/)
% and is available under the terms of an MIT-like license
% provided in COPYING. Please retain this notice and
% COPYING if you use this file (or a portion of it) in
% your project.
% -------------------------------------------------------
conf = voc_config();
VOCopts = conf.pascal.VOCopts;
ncls = length(VOCopts.classes);
ap = zeros(1, ncls);
for i = 1:ncls
cls = VOCopts.classes{i};
a = load([path cls suffix]);
ap(i) = xVOCap(a.recall, a.prec);
end
fprintf('\n');
fprintf('%.1f & ', [ap mean(ap)]*100);
fprintf('\n');