How to apply a function on all images in ImageDatastore ?

16 views (last 30 days)
I am using Imagedatastore function for classification problem but now I need to apply an function to all images in imageDatastore
YPred =classify(net,TestImages);

Accepted Answer

Jeremy Hughes
Jeremy Hughes on 5 Feb 2021
Edited: Jeremy Hughes on 5 Feb 2021
I think this is what you want.
imds = imageDatastore(files,...)
tds = transform(imds,@(img)classify(net,img));
YPred = readall(tds);
  3 Comments

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!