Classification neural network - single image or datastore

1 ビュー (過去 30 日間)
Elvira 2021 年 11 月 2 日
コメント済み: Prateek Rai 2021 年 11 月 12 日
how is it possible to have different results (true positive) using the following methods?
1) augimds = augmentedImageDatastore(inputSize(1:2), imds); %only resize
[predictedClasses1, predictedScores1] = classify(net, augimds);
create a datastore, resize the image of the datastore, classify the images
2)[YPred,scores] = classify(net,imgLaikaGrass);
take each image belonging to the previous datastore (one-by-one) and classify it. Images have been already resized accordingly.
Confusion chart results in a different number of true positives in comparing the two methods. In other words, why an image correctly classified in 1) is not correctly classified using 2).
Thank you

回答 (1 件)

Prateek Rai
Prateek Rai 2021 年 11 月 6 日
To my understanding, you are using two methods that ideally should yield the same result but on implementation getting different results. This also happens when you train the same network but get different results each time. You can refer to the following MATLAB Answer post on "Different neural network training result each time" to get more idea.
  2 件のコメント
Prateek Rai
Prateek Rai 2021 年 11 月 12 日
Refer to the following MATLAB Answer post on "" to learn exact reason on why we get different results even when we use the same net for classification.



Find more on Deep Learning Toolbox in Help Center and File Exchange



Community Treasure Hunt

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

Start Hunting!

Translated by