How to deploy a caffe model generated from digit?

414 views
Skip to first unread message

Shakti Dhar Sharma

unread,
Dec 9, 2016, 11:54:48 AM12/9/16
to DIGITS Users
Hi,
I have trained a caffe model in digit and downloaded the tar.gz file.
Based on http://adilmoujahid.com/posts/2016/06/introduction-deep-learning-python-caffe/ or http://www.cc.gatech.edu/~zk15/deep_learning/classify_test.py , I tried setting up a python script to classify an individual image.
But the results from this script varies alot from the results in digit itself.

Any examples to setup a model from DIGITS? Either C++ or Python is good enough.

Any pointers welcome.

Thanks.

Greg Heinrich

unread,
Dec 9, 2016, 3:42:26 PM12/9/16
to DIGITS Users

Shakti Dhar Sharma

unread,
Dec 10, 2016, 5:55:43 AM12/10/16
to DIGITS Users
Thanks, yes, I saw this. And am using this as well.
But somehow it gives me a different result from what I get in the browser.
I am using bmp images, so I suspect there is something in this script which is missing compared to the ones provided in the browser interface.
I have yet to figure out what is the difference.

To expand on the issue further.

After training, if I post my image for classification, I am getting results, as expected.

But when using this example, I get wrong results, over biased towards one particular class.

Shakti Dhar Sharma

unread,
Dec 10, 2016, 7:30:32 AM12/10/16
to DIGITS Users
I think I understood what's going on...

In the example, it says :
Mean subtraction

This example subtracts a mean pixel rather than the whole mean file. In DIGITS, the same method will be used as was originally used when training your model (None, Image or Pixel).


In my model, I used the options, Image, in substract mean drop down.

How can I modify the example .py to address this?


Or alternatively, which option should I go for in the model to get identical results?


Is substact a mean pixel same as choosing "Pixel" in the model?




On Saturday, 10 December 2016 02:12:26 UTC+5:30, Greg Heinrich wrote:

Greg Heinrich

unread,
Dec 10, 2016, 4:33:15 PM12/10/16
to Shakti Dhar Sharma, DIGITS Users
Yes, the easiest way for you would be to select "pixel" in the mean subtraction method when creating the model.

--
You received this message because you are subscribed to the Google Groups "DIGITS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to digits-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/digits-users/cf1c66d8-e355-4a4c-b29c-8d86e199c167%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages