I am new in this field of machine learning, to test I wanted to do a simple project. Create a cnn capable of recognizing hamburger images. As I do not have the ability to collect more than 10,000 images of hamburgers I have used an existing model to train what I need ... I have used VGG16.
This is the notebook I am using, to do transfer learning. I am training the model in detecting cats and hamburgers. https://github.com/EsteveSegura/detecting-food/blob/master/src/BurgerCNN.ipynb
If the notebook does not load, the entire code is also here https://gist.github.com/EsteveSegura/2be156ba5431fc42fb8ac13eb0506c82
Cat: 1024 imgs
Burger: 1097 imgs
Cat: 416 imgs
Burger: 326 imgs
When I try to predict photos of hamburgers, it usually gives a good result ... But it also detects as burger photos of tacos (99% acuraccy). Is it an overfitting problem? Do I need more images? Am I doing the transfer learning in a correct way?
My goal will be to detect if there is a hamburger in the photo or not.
One of the recommendations they have given me is to train a third class with completely random objects that do not repeat ... Can this help? In case I can help? How?