MNIST dataset wrong classification

62 views
Skip to first unread message

Sarah

unread,
Jun 12, 2017, 2:41:31 AM6/12/17
to Caffe Users
Hello,

I'm trying to classify some handwriting images. Therefore I followed the MNIST tutorial http://caffe.berkeleyvision.org/gathered/examples/mnist.html and everything went well, I got a caffemodel as result. To classify images I followed this tutorial: http://caffe.berkeleyvision.org/gathered/examples/cpp_classification.html and adjusted the files:
- deploy.prototxt --> lenet.prototxt
- imagenet_mean.binaryproto --> mnist_mean.binaryproto like it is described in make_imagenet_mean.sh
- synset_words.txt: I created a textfile like

0 zero
1 one
2 two
...
9 nine

If I try to classify now, I always get results like

1.0000 - "3 three"
0.0000 - "4 four"
0.0000 - "1 one"
0.0000 - "0 zero"
0.0000 - "2 two"

There is always one value exaktly 1.0000 and all others zero. Most of the time the result is incorrect when I use images I "produced" with paint. When I use an image from the database I get the right result as was expected as it was already used for training.
My question is why do I always get a value of exakt 1.0000 and no uncertainty about other values? Where is my mistake?
I use Caffe in C++.

Thanks in advance for your ideas!

Clarissa

unread,
Jun 19, 2017, 10:26:45 AM6/19/17
to Caffe Users
In the meantime I get right classification in many cases (I had a mistake in my self-created images as they weren't in the demanded size of 28x28 pixels). But I still have the problem, that I always get results with values 1,0000. Can anybody help me why there is no uncertainty in the results?

I'd really appreciate that.

Dimitris Kz

unread,
Aug 26, 2017, 6:05:48 AM8/26/17
to Caffe Users
Hey Sarah,

I have EXACTLY the same issue and just saw your post. If you found a solution in the meanwhile I would be grateful if you could share it.. Being a beginner in the field, I find it quite annoying that the "train and test" section of the tutorial has only training instructions and no examples on how to run a classification example (and potential pitfalls).
Reply all
Reply to author
Forward
0 new messages