I follow Qualcomm Neural Processing Engine tutorial to build the sample app.
When app loads model occur error. Error message following
09-01 12:21:20.600 30650-30681/com.qualcomm.qti.snpe.imageclassifiers E/LoadNetworkTask: Unable to create network! Cause: error_code=307; error_message=Model record is missing in dlc. Missing mandatory record model; error_component=Dl Container; line_no=447; thread_id=-1422036112
java.lang.IllegalStateException: Unable to create network! Cause: error_code=307; error_message=Model record is missing in dlc. Missing mandatory record model; error_component=Dl Container; line_no=447; thread_id=-1422036112
at com.qualcomm.qti.snpe.internal.NativeNetwork.nativeInitFromFile(Native Method)
at com.qualcomm.qti.snpe.internal.NativeNetwork.<init>(NativeNetwork.java:90)
at com.qualcomm.qti.snpe.SNPE$NeuralNetworkBuilder.build(SNPE.java:214)
at com.qualcomm.qti.snpe.imageclassifiers.tasks.LoadNetworkTask.doInBackground(LoadNetworkTask.java:50)
at com.qualcomm.qti.snpe.imageclassifiers.tasks.LoadNetworkTask.doInBackground(LoadNetworkTask.java:20)
at android.os.AsyncTask$2.call(AsyncTask.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
How can I solve this problem?
The sequence to solve it is as follows:
1) download and pack alexnet models as in https://developer.qualcomm.com/software/snapdragon-neural-processing-engine-ai/getting-started specific, you need to :
2) after it, you may face this problem : https://developer.qualcomm.com/forum/qdn-forums/software/snapdragon-neural-processing-engine-sdk/35375
to solve this, you can use first bypass here ( Android Studio "error: failed to read metadata" after update to 3.0.0) as this is ongoing bug in aapt2
3) If it still not solved , validate that all files are on the android device by using adb shell:
What we can see here is: a. the problem is that the SNPE search the files not in the right place so you can move the directory to the right place
b. the directory is empty - so you can push the expected data to the right place: just extract it to certain directory and from the directory do :
And it should work.