Did anybody triy to predict single images downloaded from the internet?
My model has ~96.5% accuracy. I tried to load 10 pictures with somehow similar to the pictures of the training set from google images (tried to pick those that had single leaf, soil background …etc). But the model predicted all wrong!
I suspected that there is something wrong with my code. Tried several pictures from the validation set and all predicted correct except for the few that I know it was confusing for the model and that’s why it has 96% accuracy.
It is weird that no single picture from the internet predicted well…
Does that mean the model is overfit on the kaggle dataset because it does not have varieties of backgrounds , lighting changes …etc.?
I followed the template of dog breeds of Jeremy. And the single file prediciton like Jeremy’s code:
fn = ‘testing_from_www\thumb_gallery.jpg’
trn_tfms, val_tfms = tfms_from_model(arch, sz)
ds = FilesIndexArrayDataset([fn], np.array(), val_tfms, PATH)
dl = DataLoader(ds)
preds = learn.predict_dl(dl)
Should we do normalization for the pictures before making prediction?
I thought this is already done in part of fastai so I did not make any changes to the pictures.