In [11]:
%matplotlib inline
%pylab inline
In [12]:
from alabortcvpr2015.utils import pickle_load
path = '/data/'
exp = 'lfpw_fast_dsift'
legend_entries = ['Initial',
'AAM-PIC',
'AAM-AIC',
'CLM-RLMS',
'UNI-PIC-RLMS',
'UNI-AIC-RLMS']
aam_pic = pickle_load(path + 'PhD/Results/aam_pic_' + exp)
aam_aic = pickle_load(path + 'PhD/Results/aam_aic_' + exp)
clm_rlms = pickle_load(path + 'PhD/Results/clm_rlms_' + exp)
unified_pic_rlms = pickle_load(path + 'PhD/Results/unified_picrlms_' + exp)
unified_aic_rlms = pickle_load(path + 'PhD/Results/unified_aicrlms_' + exp)
results = [aam_pic, aam_aic, clm_rlms, unified_pic_rlms, unified_aic_rlms]
In [13]:
initial_errors = [fr.initial_error() for fr in unified_aic_rlms]
final_errors = []
for fitter_results in results:
final_errors.append([fr.final_error() for fr in fitter_results])
errors = [initial_errors] + final_errors
In [14]:
from menpofit.visualize import plot_ced
plot_ced(errors, legend_entries=legend_entries)
In [9]:
from __future__ import division
print '\t\t', 'Mean \t', 'STD \t', 'Median \t', 'Convergence \t'
for err, method in zip(errors, legend_entries):
print method, '\t',
print np.round(np.mean(err), decimals=4), '\t',
print np.round(np.std(err), decimals=4), '\t',
print np.round(np.median(err), decimals=4), '\t',
c = 0
for e, ini_e in zip(err, errors[0]):
if e < ini_e:
c+=1
print np.round(c / len(err), decimals=4)
In [10]:
it_errors = []
for fitter_results in results:
all_errors = np.asarray([fr.errors() for fr in fitter_results])
it_errors.append(np.mean(all_errors, axis=0))
it_errors = np.asarray(it_errors)
plot(xrange(it_errors.shape[1]), it_errors.T, linewidth=2)
legend(legend_entries[1:])
xlim((0, 20))
xlabel('Number of Iterations')
ylabel('Mean Normalized Point-to-Point Error')
plt.gcf().set_size_inches((7, 5))