Caffe for an Android Project

1,179 views
Skip to first unread message

Dushyant

unread,
Jan 8, 2017, 6:01:00 AM1/8/17
to Caffe Users
I need to use caffe for an android project. I tried the demo described in https://github.com/sh1r0/caffe-android-demo and it worked fine for both custom and pre-trained models.
But now I need to use caffe with cpp files and I'm really confused what should I do?
It would be really helpful if someone can guide me through a series a steps on how to do that??

Saket Sinha

unread,
Jan 8, 2017, 11:46:54 PM1/8/17
to Dushyant, Caffe Users
Hi ,

First of all, the GitHub repo you have mentioned does not to train the data but does only the prediction part.
Secondly, caffe runs in CPU mode in the code.

So there are two things for you to decide whether you want to do prediction only or training also for your case(which is almost impossible on a mobile phone due to memory and battery life limitations). Then if you intend to you GPU, you need to pull the Opecl port of Caffe from AMD branch and get the Opecl shared library from you mobile manufacturer and try to cross-compile caffe. 

Regards,
Saket Sinha



--
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+unsubscribe@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/c29461b9-d8be-4b6b-abb5-6f5470d9bc4d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dushyant

unread,
Jan 9, 2017, 12:26:51 AM1/9/17
to Caffe Users, dushyant...@gmail.com
Thanks for the reply Saket

I want to use GPU for trained model(just the prediction part) but I can't seem to find a good tutorial for that. 
I searched and found this library https://github.com/strin/caffe-android-opencl but there's no description on how to use that.

On Monday, 9 January 2017 10:16:54 UTC+5:30, Saket Sinha wrote:
Hi ,

First of all, the GitHub repo you have mentioned does not to train the data but does only the prediction part.
Secondly, caffe runs in CPU mode in the code.

So there are two things for you to decide whether you want to do prediction only or training also for your case(which is almost impossible on a mobile phone due to memory and battery life limitations). Then if you intend to you GPU, you need to pull the Opecl port of Caffe from AMD branch and get the Opecl shared library from you mobile manufacturer and try to cross-compile caffe. 

Regards,
Saket Sinha


On 08-Jan-2017 4:31 pm, "Dushyant" <dushyant...@gmail.com> wrote:
I need to use caffe for an android project. I tried the demo described in https://github.com/sh1r0/caffe-android-demo and it worked fine for both custom and pre-trained models.
But now I need to use caffe with cpp files and I'm really confused what should I do?
It would be really helpful if someone can guide me through a series a steps on how to do that??

--
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.

rsi...@asu.edu

unread,
Feb 22, 2017, 8:04:49 PM2/22/17
to Caffe Users
Hi, could you please let me know, what files have you pushed onto the mobile device?
After building caffe, I was trying to push files onto the mobile device I wanted to know hat all files do i need to push using ADB to train a model.

2941...@qq.com

unread,
Mar 27, 2017, 5:29:55 AM3/27/17
to Caffe Users
hello,Dushyant . Has you compiled the project   https://github.com/strin/caffe-android-opencl  ? 
  
So if you got it ,please give me some advices on how about build it. 

thanks a lot!!!

在 2017年1月8日星期日 UTC+8下午7:01:00,Dushyant写道:
Reply all
Reply to author
Forward
0 new messages