Effacer les filtres
Effacer les filtres

Classification neural network - single image or datastore

1 vue (au cours des 30 derniers jours)
Elvira le 2 Nov 2021
Commenté : Prateek Rai le 12 Nov 2021
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

Réponses (1)

Prateek Rai
Prateek Rai le 6 Nov 2021
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 commentaires
Elvira le 7 Nov 2021
Thank you very much for your answer.
Anyway, I am using the same net for both classification problems.
Does it mean that the Matlab function 'classify' has a random process each time it is called? I suppose it doesn't, for example during prediction with 2 different methods: Occlusion Sensitivity and LIME, I had the same results... Maybe because both have as INPUT a single image and not a database?
Thank you again.
Prateek Rai
Prateek Rai le 12 Nov 2021
Refer to the following MATLAB Answer post on "https://www.mathworks.com/matlabcentral/answers/50-why-am-i-getting-different-performance-results-from-neural-network-trained-with-100-train-0-valid" to learn exact reason on why we get different results even when we use the same net for classification.

Connectez-vous pour commenter.


En savoir plus sur Image Data Workflows dans Help Center et File Exchange



Community Treasure Hunt

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

Start Hunting!

Translated by