-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path2_show_curves.m
67 lines (55 loc) · 1.88 KB
/
2_show_curves.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
% % % % % % % % % % %
%
% This code show the evaluation curves. At line 19 is possible specify
% methods of interest.
%
% This code is provided as evaluation of:
% SHREC 2019: Matching Humans with Different Connectivity
% S. Melzi, R. Marin, E. Rodolà, U. Castellani, J. Ren, A. Poulenard, P.
% Wonka, M. Ovjanikov
%
% For any doubt or comment, please contact me:
% riccardo.marin_01@univr.it
%
% % % % % % % % % % %
clear all;
addpath('.\utils');
% Specify methods to evaluate
methods = [dir(['.\matches\FM*'])];
thresh = 0:0.001:0.50;
h1=figure(1);
for met=1:size(methods,1)
% Load method
name_method = methods(met).name;
disp(name_method);
names_ = dir(['.\evaluation\',name_method,'\']);
names = sort({names_.name})';
my_mean_curve = zeros(1,501);
prev_mean_curve = zeros(1,501);
my_mean_err=0;
prev_mean_err=0;
n=0;
% Load curves
for j=3:size(names,1)
pairs = names{j};
C = strsplit(pairs,{'_','.'});
n=n+1;
my_e=load(['.\evaluation\',name_method,'\',pairs]);
assert(not(logical(sum(isnan(my_e.curve)))));
assert(not(logical(sum(isnan(my_e.err)))));
my_mean_curve=my_mean_curve+my_e.curve;
my_mean_err=my_mean_err+mean(my_e.err);
end
% Mean curve and error
my_mean_curve=my_mean_curve./n;
my_mean_err=my_mean_err./n;
set(0, 'currentfigure', h1);
plot(thresh, my_mean_curve, 'linewidth', 2); hold on;
set(gca, 'xlim', [0 max(thresh)]); set(gca, 'ylim', [0 100]);
set(gca, 'xgrid', 'on'); set(gca, 'ygrid', 'on');
save(['./',name_method,'.mat'],'my_mean_curve','my_mean_err');
disp(mean(my_mean_err));
end
m = {methods.name};
labels= strcat(erase(erase(m,'_new'),'i')');
legend(labels, 'Location','southeast', 'Interpreter', 'none')