My trained image classifer model classify all the images that are not even in the category
what about checking probability score? Eventhough a cup is classifed as Dog , it will have less score. so you can set your threshold. If the probability score > threshold value, then it will be displayed as animal otherwise not.
I have already trained a model to recognise animal and it is working, deployed into android application. I'm finding for a solution to make the image classifier to only classify the trained categories. I'm not sure whether to do this through the model training or any code to be added to solve this.
Example, if a picture of a cup is sent for classification, the result shows as Dog or some other animal name. How to make only classify the given category, anything else than that show it as "not a animal".
Im using Tensorflow 1.12, MobileNet Model