필터 지우기
필터 지우기

why my classification results are not correct

조회 수: 2 (최근 30일)
Aiman Zara
Aiman Zara 2023년 1월 2일
답변: Image Analyst 2023년 1월 2일
net = googlenet;
inputSize = net.Layers(1).InputSize
classNames = net.Layers(end).ClassNames;
numClasses = numel(classNames);
disp(classNames(randperm(numClasses,10)))
im = imread("D:\cotton\dataset\Alternaria fliph\(9).jpeg");
figure
imshow(im)
size(im)
im = imresize(im,inputSize(1:2));
figure
imshow(im)
[label,scores] = classify(net,im);
label
figure
imshow(im)
title(string(label) + ", " + num2str(100*scores(classNames == label),3) + "%");
[~,idx] = sort(scores,'descend');
idx = idx(5:-1:1);
classNamesTop = net.Layers(end).ClassNames(idx);
scoresTop = scores(idx);
figure
barh(scoresTop)
xlim([0 1])
title('Top 5 Predictions')
xlabel('')
yticklabels(classNamesTop)

답변 (1개)

Image Analyst
Image Analyst 2023년 1월 2일
It was probably not trained with enough examples of the class it's getting wrong.

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by