Dear SNPE developers,
I converted the tensorflow model ssd_mobilenet_v1_coco_2017_11_17.tar.gz to dlc, then run in android os.
when classify the first image, output error msg1, then get the wrong result, then classify the next image, output error msg2, and the app crash.
could u help me to fix this.
[error msg1]
03-23 05:45:47.566 8904 8935 W art : ae339000-ae33a000 r--p 00000000 00:00 0 [anon:atexit handlers]
03-23 05:45:47.566 8904 8935 W art : ae33a000-ae33b000 ---p 00000000 00:00 0 [anon:thread signal stack guard page]
03-23 05:45:47.566 8904 8935 W art : ae33b000-ae33d000 rw-p 00000000 00:00 0 [anon:thread signal stack]
03-23 05:45:47.566 8904 8935 W art : ae33d000-ae33e000 r-xp 00000000 00:00 0 [sigpage]
03-23 05:45:47.567 8904 8935 W art : ae33e000-ae39d000 r-xp 00000000 103:09 382 /system/bin/linker
03-23 05:45:47.567 8904 8935 W art : ae39d000-ae39f000 r--p 0005e000 103:09 382 /system/bin/linker
03-23 05:45:47.567 8904 8935 W art : ae39f000-ae3a0000 rw-p 00060000 103:09 382 /system/bin/linker
03-23 05:45:47.567 8904 8935 W art : ae3a0000-ae3a2000 rw-p 00000000 00:00 0
03-23 05:45:47.567 8904 8935 W art : ae3a2000-ae3a3000 r--p 00000000 00:00 0
03-23 05:45:47.567 8904 8935 W art : ae3a3000-ae3a5000 rw-p 00000000 00:00 0
03-23 05:45:47.567 8904 8935 W art : ae3a5000-ae3aa000 r-xp 00000000 103:09 262 /system/bin/app_process32
03-23 05:45:47.568 8904 8935 W art : ae3aa000-ae3ab000 r--p 00004000 103:09 262 /system/bin/app_process32
03-23 05:45:47.568 8904 8935 W art : ae3ab000-ae3ac000 rw-p 00000000 00:00 0
03-23 05:45:47.568 8904 8935 W art : ae400000-b8400000 rw-p 00000000 00:00 0 [heap]
03-23 05:45:47.568 8904 8935 W art : be5ac000-be5ac000 ---p 00000000 00:00 0
03-23 05:45:47.569 8904 8935 W art : be5ac000-bedab000 rw-p 00000000 00:00 0 [stack]
03-23 05:45:47.569 8904 8935 W art : ffff0000-ffff1000 r-xp 00000000 00:00 0 [vectors]
03-23 05:45:47.569 8904 8935 W art :
03-23 05:45:47.570 8904 8935 W art : Large object allocation failed: Failed anonymous mmap(0x0, 134946816, 0x3, 0x2, 36, 0): Out of memory. See process maps in the log.
03-23 05:45:47.570 8904 8935 W art : Throwing OutOfMemoryError "Failed to allocate a 134944906 byte allocation with 7402280 free bytes and 501MB until OOM"
03-23 05:45:47.761 8904 8915 I art : Background sticky concurrent mark sweep GC freed 4(440B) AllocSpace objects, 0(0B) LOS objects, 0% free, 139MB/139MB, paused 1.137ms total 186.698ms
[error msg2]
03-23 05:59:48.413 8904 9632 F libc : /local/mnt2/workspace2/varulesa/aosp/ndk_match/out/build/tmp/build-16404/build-libc++/ndk/sources/cxx-stl/llvm-libc++/../llvm-libc++abi/libcxxabi/src/abort_message.cpp:74: void abort_message(const char *, ...): assertion "terminating with uncaught exception of type std::bad_alloc: std::bad_alloc" failed
03-23 05:59:48.413 8904 9632 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 9632 (AsyncTask #4)
03-23 05:59:48.414 258 258 W : debuggerd: handling request: pid=8904 uid=10214 gid=10214 tid=9632
03-23 05:59:48.526 9639 9639 F DEBUG : pid: 8904, tid: 9632, name: AsyncTask #4 >>> com.qualcomm.qti.snpe.imageclassifiers <<<
03-23 05:59:49.724 258 258 W : debuggerd: resuming target 8904
03-23 05:59:49.951 391 391 I Zygote : Process 8904 exited due to signal (6)
Thanks
BRs
Hi,
I ran into the out of memory error when developing an app separate from the example as well. It was resolved by adding:
android:largeHeap="true"
to the manifest in the <application> section.
Have you been able to get all the outputs from the model? I can run it but only get detection_classes as output. I do not see the scores or boxes without enabling debug option which drastically slows down performance.
Good luck!
To get all the outputs you have to call setOutputLayers() in the builder and give the specific names of outputs you want. I believe it's mentioned in another thread or two on this forum. Also documented is what line to put into your image_list.txt to get snpe-net-run to output those other outputs as well.
That worked, thank you!
Hi
I have set android:largeHeap="true" , and run with snpe is 1.13.0.0 on nexus p6.
I can get the following output。
“detection_classes:0”
“Postprocessor/BatchMultiClassNonMaxSuppression_classes”
”Postprocessor/BatchMultiClassNonMaxSuppression_boxes“
“Postprocessor/BatchMultiClassNonMaxSuppression_scores”
thanks.
Did anyone here successfully decode the output?
I get garbage!
I responed in your other thread, good luck!