-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Have built successfully, but cannot used in Android studio project #5
Comments
I made it work (one year ago), I will give you few tips to solve your problem:
Personally, I worked on Deep Learning on mobile devices, and I release my own framework In addition, there are several other interesting frameworks. (they are not mine) This is a list of papers about the topic Feel free to contact me if you have any question about deep learning on mobile devices. Best regards, Olivier |
Thank you so much for your answer. I checked the original codes actually could not find the functions mentioned in logcat. I've made modification. The mobile phone I test is Xiaomi6 (snapdragon835, AArch64, corresponding abi is arm64-v8a). I wander whether shared library could support arm64-v8a. |
look at the end: the function "readNetParamsFromTextOrDie". As I mentioned earlier, you may use the new definition of "deploy.proto". Caffe is looking for some information and don't find it, so it quit the program. On NDK, it immediately lead to a segmentation error. Check the old definition of deploy.proto. From what i remember it is just a difference of one line. Olivier |
android app could run but as you said, of very bad performance. I looked at logcat and found the problem: 11-08 10:46:17.983 28133-28133/? I/caffe_jni: I1108 10:46:17.982991 28133 caffe_mobile.cpp:66] #GPUs1 when select an image for classification, there comes: Could you please tell tell why "Skipped XXX frames! The application may be doing too much work on its main thread." . Thank you! |
I have built this successfully resulting in libcaffe.so and libcaffe.jni.so, but when importing .so and .jni.so into caffe-android-demo, error comes as following,
11-02 10:23:28.625 8540-8540/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.sh1r0.caffe_android_demo, PID: 8540
java.lang.UnsatisfiedLinkError: No implementation found for void com.sh1r0.caffe_android_lib.CaffeMobile.setNumThreads(int) (tried Java_com_sh1r0_caffe_1android_1lib_CaffeMobile_setNumThreads and Java_com_sh1r0_caffe_1android_1lib_CaffeMobile_setNumThreads__I)
at com.sh1r0.caffe_android_lib.CaffeMobile.setNumThreads(Native Method)
at com.sh1r0.caffe_android_demo.MainActivity.onCreate(MainActivity.java:91)
at android.app.Activity.performCreate(Activity.java:6861)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2693)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2801)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1548)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6365)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:791)
I guess it may be because something wrong with the dynamic library files since it is ok when I import .so and .jni.so in caffe-android-lib into this project.
The text was updated successfully, but these errors were encountered: