Predict classification of a set of images using googlenet

8 ビュー (過去 30 日間)
Maria Pauline Capiroso
Maria Pauline Capiroso 2023 年 5 月 22 日
回答済み: Image Analyst 2023 年 5 月 30 日
Hi! I want to classify seeds into four categories. With that, I trained a googlenet cnn. However, I would like to classify another set of images at once using the trained network I've made. Can anyone guide me on how to do it? Thank you so much!

回答 (2 件)

Ranjeet
Ranjeet 2023 年 5 月 30 日
Assuming that another set of images belong to the four seed categories, then no extra work is required. The trained 'GoolgeNet' can be used.
If the images are from different class(es), then ‘GoogleNet’ can be fine-tuned with data from the new classes along with the four seed classes.
Following resource can be helpful –
  2 件のコメント
Maria Pauline Capiroso
Maria Pauline Capiroso 2023 年 5 月 30 日
編集済み: Maria Pauline Capiroso 2023 年 5 月 30 日
Hi @Ranjeet! Yes, I want to test another set of images (with same set of classes). With that, I made a new script with this code:
function test_network(net, image)
I = imread(image);
R = imresize(I,[224, 224]);
[Label, Probability] = classify(net, R);
figure;
imshow(R)
title({char(Label),num2str(max(Probability)*100, 6)})
end
wherein net = trained Googlenet CNN which I modified. However, the code above can only classify 1 seed at a time. I would like to classify all the seeds inside a folder automatically and generate a confusion matrix using my trained Googlenet. Please guide me. Thank you!
Ranjeet
Ranjeet 2023 年 5 月 30 日
You can use the following resource to create an image datastore with your set of images and classify at once.
The classification step is shown the Transfer Learning using Pretrained Network example in 'Classify Validation Images' part.
Also, you may refer to the following resource to create confusion matrix.

サインインしてコメントする。


Image Analyst
Image Analyst 2023 年 5 月 30 日

カテゴリ

Help Center および File ExchangeImage Data Workflows についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by