Closed billygl closed 7 years ago
@billygl
First, /storage/emulated/0/Download/caffe_mobile/bvlc_reference_caffenet/deploy.prototxt
does not match /storage/278E-8716/caffe_mobile/bvlc_reference_caffenet/deploy.prototxt
. And AFAIW, /emulated/0
is usually the primary external storage rather than the secondary one (i.e., external sd card) [1]. Please check the absolute path of your files.
Yes, I checked both locations. For that reason,
Sorry for the confusion. I updated the post
@billygl Is your phone on android 6 (marshmallow)?
Yes Android 6.0.1. Galaxy S7 Edge.
Maybe you should try and modify its Java source code? The file paths are designated in its source code, both .prototxt and weight file. Push these files to somewhere you have access to. Try enabling developer mode if you have to. Also be advised be careful with that S7 May cause massive explosion
Yes. I pushed these files to 2 locations and I changed the source code for theses locations in different tests but I highlight that
File file = new File(modelProto);
if(file.exists())Log.e("test", "ok.");
It works, but
caffeMobile.loadModel(modelProto, modelBinary);
doesn't work
@billygl I found the problem, it's about runtime permission control introduced in android 6. Here's the workaround: manually grant the app with storage permission.
Excellent! Thanks
I used
And I watched ok in Android Log Monitor. It means Android can find the file. It exists. But I got
when the execution arrived to caffeMobile.loadModel(modelProto, modelBinary);
It means that Android find the file but io.cpp can't find the file.
I doubled checked the path and I added
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
And I updated the code using the external storage SD cardbut I can't solve this issue.
I have
And I don't know what is the problem. Please, help