Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Image classification with Keras on Tensorflow: how to find which images are misclassified during training?

I use Keras 2.0 (TensorFlow backend) on Ubuntu 17.04 to do binary image classification. Everything works great except I'd like to see which images are misclassified. How do I do that?

Also, unsure if it'd answer my problem, but in TensorBoard I can't get the image tab to work, so don't know if that'd help.

I've done a lot of googling, of course, but I just can't find an answer.

like image 567
Ada Stra Avatar asked Jun 24 '17 20:06

Ada Stra


1 Answers

Simply predict the classifications and compare with your true values...

predicted = model.predict(trainingImages)    

Subtracting and removing the sign should result in near zero results for the right ones and high results for the wrong ones:

result = numpy.absolute(trainingClasses-predicted)
like image 77
Daniel Möller Avatar answered Dec 20 '22 16:12

Daniel Möller