Week 2 Assignment 1 optional part

I tried to test the trained resnet50 model on my own images. I captured 6 images each for class 0-5. But the model was able to hardly classify 1 or 2 images correctly. What possible modifications can be done? Some of the images are as follows.

Hey @vivek_mehta,
There can be a couple of reasons as to why your model performs poorly on your test samples. The primary reason is the differences in the samples themselves. In the notebook, the model has been trained on samples from the SIGNS dataset, and the evaluation has been carried out on samples from the same dataset as well, and hence, the model gives good performance scores. However, when you tested the model on your own samples, you are essentially feeding different samples from that of the dataset used to train the model, and hence, the model performs poorly.

Some of the differences in the samples could be difference in image quality (which is basically the size in pixels), difference in the background, difference in the shape, difference in the lighting conditions etc. For instance, you are feeding the images of all sizes, and each of them is shrunk to a size of (64, 64, 3) which is too small a size for any typical image of today (which usually has a size of (720, 1080, 3)). So, during the shrinking, your image might have lost important information, and hence, the model was unable to make predictions on your samples.

So, you can try to visualize the existing images in the dataset, and try to match your captured samples with the ones in the dataset in terms of different characteristics, specially in terms of the size in pixels, and see if the model performs better afterwards. Let me know if this helps.