I am testing my trained models to see how accurate they are at predicting the categories of the brand new images (not seen previously). I used the following code, but there are 2 issues with it: a) it shows just one category without % probabilities; b) it is set up to just test one image at a time:
In: img = open_image(“Folder/xxx.png”)
pred_class, pred_idx, outputs = learn.predict(img);pred_class
Out: Category (Category name is given here)
My question is how can I test a bunch of brand new images and get the result with file names and percentage of probabilities for each of my 3 possible categories, i.e. the output should be as follows:
xxx.png - category A 98% category B 1.5% Category C 0.5%
ccc.png - category A 80% category B 10 % Category C 10%
something like that.