solrex/caffe-mobile

What's the difference between yours “libcaffe-jni.so” and sh1r0/caffe-android-lib?

Closed this issue · 4 comments

I have trained a cascade face detection model and load it on my Android device. First time I use the library of sh1r0/caffe-android-lib, but it work not well. Actually, it became more and more slowly in real time, the FPS drops from 12 to 1 or even more.Then i try to use yours library and the problem solve! I'm sure there is no errors in my codes. Can you indicate the approximate reason?

@yungs2017 Glad it works for you. Caffe-android-lib has more dependencies and is larger in size. It uses a older version of caffe and doesn't optimize the math_functions.hpp for android/ios. The real reason of your FPS drops is CPU down-clocking. If your app consumes a lot of computational power, your phone will generate more heat. Down-clocking will be triggered for self-protection. If you use a more complex model, caffe-mobile will encounter this situation too. That's why I eliminate so many dependencies, even use protobin to replace prototxt.

@solrex That's great! But at the beginning the FPS drops from 12 to about 7~8 in a very short time, and after that has remained between 7 to 8, what does it mean?

sh1r0 commented

Hi @solrex, I found this project accidentally. No offence, I just noticed that your jni-related source files seem pretty similar to part of files in caffe-android-lib. I like open-source cultures and I'm glad that my codes help or boost someone. However, I do not think copying files from another project without giving credits is good.

@sh1r0 Yes, these files are based on your Caffe fork. Though I kept LICENSE the same, it was my fault not to mention your contribution. I added your project in "thanks" part, and a statement comment in jni-related source files (ref: https://github.com/solrex/caffe-mobile/blob/master/src/jni/). Thanks for your open-source contribution.