Using CNN on one class only I want to use InceptionV3 on one class of image (ie. to detect one type of object/one label only). For example, to detect 'penguin' or 'no penguin'. All my images have been cropped down to mostly display the object, so there is barely any background present and the object is in clear view. I have used bottlenecking; I have frozen the top layer of Inception so that I can retrain Inception to classify my object. However, this means that I have no alternative class to train with since I only want to classify one object.
The issue is that val_accuracy is always equal to 1, implying a perfect model, which my better nature says is too good to be true. Therefore, I believe the problem is that I have only provided the model with 1 class. How can I overcome this?
Finally, I have tested with InceptionV3 and an out-of-the-box model just to check that my Inception set up was not the issue. Both yielded varying training accuracy, but again, the basic model produced val_accuracy equal to 1 every time. I have also experimented with train-test splitting such as 10% to train with and 90% for validation. To my knowledge, a benefit of transfer learning is that you can use small datasets to train with. Even so, my dataset is 3300.
Since you are only using one class for training, you can't expect the network to understand what the object is not.
For example, if you want to classify cats you have to pass to the network images that are not in your main class [dogs, cars, boats, random_noise, penguins]. If you try to pass any other image to your current model it will answer with great confidence that it is a cat.
Your validation accuracy will always be 100% if you have no other classes in your dataset.
For a classification problem you need at least two classes, and your train/val/test subsets should have enough images of each class so your metrics become meaningful.