high accuracy on non trained class in tensorflow model I have trained a 4 multi-class (apple_nature, apple_disease, apple_blacrot, apple_healthy) image classification algorithm using TensorFlow. However, after training, we get a good accuracy model.
The problem I am facing is when I predict tomato images it gets high accuracy on apple values, so how can I fix this issue?
Actually, it gets a high accuracy rate on non trained classes.
It is normal because the model has never seen such data so the probability for such unseen data is like random, it can be high or low.
You should add all other images (like the ones of tomato) into a new dedicated class OTHER where you will put everything which is not in the 4 original classes.
That way, for an image of tomato your model will give a high probability for the OTHER class, and low probability for the apple classes.