How to get probabilities for classifier (custom trained model)

151 views
Skip to first unread message

Alex Potérya

unread,
Apr 11, 2015, 6:09:30 PM4/11/15
to caffe...@googlegroups.com
Hello,

I've trained a model with only one custom keywords on ~ 5000 images. Now, I'm running classifier.py like this:
python python/classfier.py --pretrained_model=./models/bvlc_googlenet/bvlc_googlenet_my_model.caffemodel --model_def=./models/bvlc_googlenet/deploy.prototxt --mean_file=./data/ilsvrc12/imagenet_mean.nyp ./test.jpg ./output.txt

Obviously, it classifies it as "0" (my only keyword). But where do I get probability for this classification (same as it's done in web demo)?

Thanks!

Alex Potérya

unread,
Apr 16, 2015, 3:49:02 PM4/16/15
to caffe...@googlegroups.com
Any advice?

Thanks.

Alex Potérya

unread,
Apr 16, 2015, 4:09:10 PM4/16/15
to caffe...@googlegroups.com
I will extend the question to the Flickr Style fine tune model.

Is there an example showing how to work with output.txt.npy to get a list of keywords/probabilities for Flickr Style data set?


On Saturday, April 11, 2015 at 6:09:30 PM UTC-4, Alex Potérya wrote:

CaffeStudent

unread,
Apr 16, 2015, 4:21:20 PM4/16/15
to caffe...@googlegroups.com
I think it's worth taking a look at this ipython notebook!

Alex Potérya

unread,
Apr 16, 2015, 4:23:45 PM4/16/15
to caffe...@googlegroups.com
Thanks! I've read this document multiple times. It doesn't seem to cover probabilities topic at all.

CaffeStudent

unread,
Apr 16, 2015, 4:26:52 PM4/16/15
to caffe...@googlegroups.com
The plots they are showing are of the probability outputs, I believe.  If you pick the max from that plot, that is the probability of that class.
Reply all
Reply to author
Forward
0 new messages