alankbi / detecto

Build fully-functioning computer vision models with PyTorch
https://detecto.readthedocs.io/
MIT License
613 stars 107 forks source link

Model predicts irrelevant images as correct prediction #103

Open thangaraj535 opened 2 years ago

thangaraj535 commented 2 years ago

WhatsApp Image 2022-01-09 at 8 26 06 PM WhatsApp Image 2022-01-09 at 8 23 11 PM WhatsApp Image 2022-01-09 at 8 22 24 PM WhatsApp Image 2022-01-06 at 10 06 54 PM WhatsApp Image 2022-01-06 at 10 04 58 PM WhatsApp Image 2022-01-09 at 8 28 30 PM WhatsApp Image 2022-01-09 at 8 27 12 PM

I have trained a custom model to predict diseases on crops leaf, while testing the model after training it is predicting a car image as disease spot with the accuracy of 99%. Kindly provide the solution for this as soon as possible. I have also attached the actual predicted image

download download (1)

thangaraj535 commented 2 years ago

@alankbi Can you please look into this issue?

alankbi commented 2 years ago

It looks like your model might be overfitted or basically just producing too many false positives. What does your training dataset look like? It might be worth going back and trying to make sure you have a wide and varied range of images to train on - I think it'd also help if several of the target objects are smaller/don't take up the whole image, that way the model doesn't learn to just predict the entire image to be a bacterial spot every time.