Forums - NPE failed to load model on Android

5 posts / 0 new
Last post
NPE failed to load model on Android
elirex
Join Date: 3 Sep 17
Posts: 2
Posted: Mon, 2017-09-04 19:55

I follow Qualcomm Neural Processing Engine official tutorial to build the Android sample app.

When the 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?

 

Thank your

 
  • Up0
  • Down0
Rex
Join Date: 8 Aug 15
Posts: 45
Posted: Fri, 2017-09-29 09:03

You need to follow the setup instructions to get the model data in the right places.

  • Up0
  • Down0
aliamir
Join Date: 6 Jun 18
Posts: 3
Posted: Mon, 2018-10-08 12:36

I am getting the same error. I was wondering if anyone was able to resolve this?

I tried both:

Inception model aquired through the setup_inceptionv3.py with a -d flag on snpe-1.19.2

- Manually converted Mobilenet SSD (also following the provided tutorial steps)

I checked that the file I'm passing to SNPE.NeuralNetworkBuilder is indeed a dlc model and that it has the right contents. I would appreciate any help on this.

  • Up0
  • Down0
peter666
Join Date: 16 Oct 18
Posts: 1
Posted: Mon, 2018-10-29 19:42

This problem happens because your app parsed the dlc file not correctly, while your app unzip model file not successfully, so dlc file is damaged in your phone.To solve this problem, you should push an undamaged dlc file to your phone. The undamaged file is in your app source directory, in src/main/res/raw/inception_v3.zip, unzip it and find model.dlc. then type: adb push model.dlc /storage/emulated/0/Android/data/com.qualcomm.qti.snpe.imageclassifiers/files/models/inception_v3

  • Up0
  • Down0
shenyingying25
Join Date: 14 Nov 18
Posts: 19
Posted: Sun, 2018-11-25 19:33

in app. it takes long time to  load network ?

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.