What does the caffe demo really do?

1,231 views
Skip to first unread message

Daniel Seita

unread,
Oct 12, 2014, 6:48:09 PM10/12/14
to caffe...@googlegroups.com
There's a demo of caffe here. When I run it on photos I've uploaded, I get 5 descriptions in the maximally accurate and maximally specific categories (each with some score attached). In the python demo, it says: "The predicted class 281 is "Tabby cat." Our pretrained model uses the synset ID ordering of the classes, as listed in ../data/ilsvrc12/synset_words.txt if you fetch the auxiliary imagenet data by ../data/ilsvrc12/get_ilsvrc_aux.sh. If you look at the top indices that maximize the prediction score, they are cats, foxes, and other cute mammals. Not unreasonable predictions, right?".

When I run the web demo, it will often output maximally accurate/specific predictions that do not correspond to any of the classes as listed in that file. But according to the web demo page it seems like the same model (ilsvrc12) is used. So do the predictions I see in that web demo give me the classes, or do they give me something else, and where might I find the possible pool of words? The web demo is currently super-fast so I'm also curious about how it works so quickly (in other papers I see that they take a long time to process images, but they might be using testing algorithms).

I am hoping to do object detection/classification on my own photos so I expect to use the python interface later; I'm just using the web demo to get a feel for how Caffe will work.

Evan Shelhamer

unread,
Oct 12, 2014, 7:15:52 PM10/12/14
to Daniel Seita, caffe...@googlegroups.com
Regarding maximally-accurate results, see the last section of http://caffe.berkeleyvision.org/gathered/examples/web_demo.html

As for the speed, the demo is fast because Caffe is fast. :)
--
You received this message because you are subscribed to the Google Groups "Caffe Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to caffe-users...@googlegroups.com.
To post to this group, send email to caffe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/caffe-users/1f654bf5-ffef-4bd7-bc58-01382a63f047%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Evan Shelhamer

Daniel Seita

unread,
Oct 15, 2014, 1:05:22 AM10/15/14
to caffe...@googlegroups.com
It looks like the web demo is down. Since I haven't yet been able to get pycaffe to compile, do you have plans to put the web demo back up?

Evan Shelhamer

unread,
Oct 15, 2014, 1:09:40 AM10/15/14
to Daniel Seita, caffe...@googlegroups.com
It goes down sometimes because it's running on a spare machine that's needed for occasional research use. It's back up now.

Evan Shelhamer

On Tue, Oct 14, 2014 at 10:05 PM, Daniel Seita <takesh...@gmail.com> wrote:
It looks like the web demo is down. Since I haven't yet been able to get pycaffe to compile, do you have plans to put the web demo back up?

--
You received this message because you are subscribed to the Google Groups "Caffe Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to caffe-users...@googlegroups.com.
To post to this group, send email to caffe...@googlegroups.com.

Shengwen Yu

unread,
Apr 11, 2015, 4:37:50 PM4/11/15
to caffe...@googlegroups.com, takesh...@gmail.com, shel...@eecs.berkeley.edu
Hi there,
I was trying to walk through the ImageNet Classification example as in this link.(http://nbviewer.ipython.org/github/BVLC/caffe/blob/master/examples/classification.ipynb)

And I got its output like this:
I0410 15:46:49.169574 1934201600 net.cpp:205] This network produces output prob
I0410 15:46:49.169616 1934201600 net.cpp:447] Collecting Learning Rate and Weight Decay.
I0410 15:46:49.169646 1934201600 net.cpp:217] Network initialization done.
I0410 15:46:49.169651 1934201600 net.cpp:218] Memory required for data: 62497920
E0410 15:46:49.579138 1934201600 upgrade_proto.cpp:609] Attempting to upgrade input file specified using deprecated transformation parameters: ../models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel
I0410 15:46:49.579169 1934201600 upgrade_proto.cpp:612] Successfully upgraded file specified using deprecated data transformation parameters.
E0410 15:46:49.579172 1934201600 upgrade_proto.cpp:614] Note that future Caffe releases will only support transform_param messages for transformation fields.
E0410 15:46:49.579177 1934201600 upgrade_proto.cpp:618] Attempting to upgrade input file specified using deprecated V1LayerParameter: ../models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel
I0410 15:46:49.852880 1934201600 upgrade_proto.cpp:626] Successfully upgraded file specified using deprecated V1LayerParameter
prediction shape: (1000,)
predicted class: 281

I am kind of worried about this "Attempting to" warnings. Is there a way to get rid of it?
And by the way, how do I know this image is classified as cat instead of anything else? I was trying to figure it out but still confused about this statement in this link( same as previous link): "If you look at the top indices that maximize the prediction score, they are cats, foxes, and other cute mammals."

Any help is appreciated !!

Shengwen Yu

unread,
Apr 11, 2015, 4:57:30 PM4/11/15
to caffe...@googlegroups.com, takesh...@gmail.com, shel...@eecs.berkeley.edu
I just came across with some materials that might answer part of my questions:

Note that we use a different indexing for labels than the ILSVRC devkit: we sort the synset names in their ASCII order, and then label them from 0 to 999. See synset_words.txt for the synset/name mapping.
the predict class is 281, and the 281st record in synset_words.txt is "n02123045 tabby, tabby cat" (0 -- 999 instead of 1 -- 1000); therefore, we can safely say the image is maximally classified as a cat instead of anything else. 
Reply all
Reply to author
Forward
0 new messages