Caffe prediction classification wrong output labels problem in results

249 views
Skip to first unread message

Saman Sarraf

unread,
Mar 4, 2016, 5:53:15 PM3/4/16
to Caffe Users
Dear Caffe expert,

I trained LeNet for 26 classes and got the test accuracy around 90%. I managed to use classify.py and also classification.bin as well as net.forward() from ipython tutorial in order to classify given single images and a set of images. Bizarrely, I noticed the predicted outputs by those three tools are wrong and don't match the original labels.
You may guess that the accuracy felt down to 4% from 90%. There has to be something wrong.
I went over all online solutions such as double checking the image size, mean of dataset and swap channel , and I am still getting bizarre and wrong labels.
This is the command I am using for C++ version
./classification.bin /Data/caffe/examples/mnist/lenet_deploy_online_all_01.prototxt /Data/caffe/examples/mnist/lenet_online_clean_norm_05_iter_10000.caffemodel /Data/repo/mean5.binaryproto /Data/label.txt /Data/repo/996.tifbin.bmpfilter.pngfilter1.jpg
This is the Python version for your reference:
/Data/caffe/python/classify.py --model_def /Data/caffe/examples/mnist/lenet_deploy_online_all_01.prototxt --pretrained_model /Data/caffe/examples/mnist/lenet_online_clean_norm_05_iter_10000.caffemodel --images_dim 28,28 /Data/repo/ /Data/repo/label_z --channel_swap 2,1,0 --mean_file /Data/mean5.npy

I should add that I have tried all combinations of --channel_swap with and without mean_file still not working.
Would anybody share the ideas and help in this matter?

I am really confused and your prompt help is so much appreciated it

Regards,
Saman
Reply all
Reply to author
Forward
0 new messages