0
$\begingroup$

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.

$\endgroup$
1
$\begingroup$

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.

$\endgroup$
2
  • $\begingroup$ So how can i fix those issues? I want to show low probability values on non trained class data. $\endgroup$ Dec 27 '20 at 5:04
  • $\begingroup$ As I said you need to retrain a model with an additional class OTHER where you put images of other vegetables and fruits which you do not want to be classified as apple. $\endgroup$ Dec 27 '20 at 19:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.