Second Prediction for CNN network

조회 수: 1 (최근 30일)
Tsvetislava Ivanova
Tsvetislava Ivanova 2022년 7월 8일
편집: Tsvetislava Ivanova 2022년 7월 9일
Hello,
I am developing an artificial intelligence system for recognizing dog breeds, which is currently still being tested and working with flowers. It is made through a Convolutional Neural Network.
I have the first predicted result, which is considered the closest in percentage. Can anyone help me to make a second and possibly a third prediction?
This is the code brief for the result field:
% Button pushed function: pushbutton2
function pushbutton2_Callback(app, event)
net = app.net;
I = app.I;
I= imresize(I,[500,500],'nearest');
[Pred,scores] = classify(net,I);
scores = max(double(scores*100));
app.edit2.Value = scores + "%" + " " + string(Pred);
*edit2 is the the field for the first prediction*
Thanks in advance :)

답변 (1개)

Image Analyst
Image Analyst 2022년 7월 9일
Try maxk
topScores = maxk(scores , 3);
  댓글 수: 1
Tsvetislava Ivanova
Tsvetislava Ivanova 2022년 7월 9일
편집: Tsvetislava Ivanova 2022년 7월 9일
Hello, and thank you for your responce.
For this field i wrote:
[YPred2,topScores] = classify(net,I);
YPred2 = maxk(YPred , 2);
topScores = maxk(scores , 2);
app.edit2_2.Value = topScores + "%" + " " + string(YPred2);
Am i on the right way? I am getting an error...
(Error using categorical/maxk
Relational comparisons are not allowed for categorical arrays that are not ordinal.)
I will be glad to help :)
Sorry, but I'm a beginner..:)

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Delaunay Triangulation에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by