|
|
|
|
|
|
|
|
|
|
|
split = 'variant_test' ; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch 1 |
|
|
case 1 |
|
|
|
|
|
images = {'0900914'} ; |
|
|
labels = {'747-400'} ; |
|
|
scores = 1 ; |
|
|
case 2 |
|
|
|
|
|
|
|
|
[images, labels] = textread(fullfile('data', ['images_' split '.txt']), '%7s%*1s%s', 'delimiter', '\n', 'whitespace', '') ; |
|
|
scores = ones(size(labels)) ; |
|
|
case 3 |
|
|
|
|
|
|
|
|
|
|
|
[images0, labels0] = textread(fullfile('data', ['images_' split '.txt']), '%7s%*1s%s', 'delimiter', '\n', 'whitespace', '') ; |
|
|
n = numel(images0) ; |
|
|
clear images labels scores ; |
|
|
for ci = 1:100 |
|
|
images{ci} = 1:n ; |
|
|
labels{ci} = repmat(ci,1,n) ; |
|
|
scores{ci} = randn(1,n) ; |
|
|
end |
|
|
images = [images{:}] ; |
|
|
labels = [labels{:}] ; |
|
|
scores = [scores{:}] ; |
|
|
end |
|
|
|
|
|
[confusion, results] = evaluation('data', split, images, labels, scores) ; |
|
|
|
|
|
figure(1) ; clf ; |
|
|
imagesc(confusion) ; axis tight equal ; |
|
|
xlabel('predicted') ; |
|
|
ylabel('ground truth') ; |
|
|
title(sprintf('mean accuracy: %.2f %%\n', mean(diag(confusion))*100)) ; |
|
|
|