AML_NPU_DEMO will not run

Which Khadas SBC do you use?


Which system do you use? Android, Ubuntu, OOWOW or others?


Which version of system do you use? Khadas official images, self built images, or others?

Khadas official image

Please describe your issue below:

We are not able to run the npu-app by following the guide (we remove the OpenCV window calls. We also tried the compiled aml_npu_demo_binaries and used the FB version. We also used the demos to create our own C application and it has the exact same error. Note that we are successfully running the system with a Python application with no real issues other than performance. We would keep using the Python application if it would produce “boxes” faster than 6 FPS. It does inference at 20 to 25 FPS, but the post-processing kills it. The goal was to run it in C++ and see if it would process at a faster framerate.

As you can see below, It finds the model, but it won’t load it. I use the same model for our Python app with no issues.

Post a console log of your issue below:

W Detect_api:[det_set_log_level:19]Set log level=4
W Detect_api:[det_set_log_level:21]output_format not support Imperfect, default to DET_LOG_TERMINAL
W Detect_api:[det_set_log_level:26]Not exist VSI_NN_LOG_LEVEL, Setenv set_vsi_log_error_level
D Detect_api:[det_set_log_config:360]Leave, level:4
det_set_log_config Debug
D Detect_api:[det_set_model:205]Enter, modeltype:13
D Detect_api:[check_and_set_function:164]Enter, dlopen
D Detect_api:[check_and_set_function:199]Leave, dlopen, ret=0
I Detect_api:[det_set_model:223]Start create Model, data_file_path=nn_data
E [model_create:64]CHECK STATUS(-1:A generic error code, used when no other describes the error.)
E Detect_api:[det_set_model:226]Model_create fail, file_path=nn_data, dev_type=1
D Detect_api:[det_set_model:241]Leave, modeltype:13

Hello @BrandonTetra

@Louis-Cheng-Liu will help you then.

Hello @BrandonTetra ,

Is your Python app use KSNN? In most cases, model quantized by KSNN tool can not use in C++. You can refer this doc to requantize model.

NPU SDK Usage [Khadas Docs]

If still work failed, please provide your origin model.

I think you are correct. I have battled the convert and then this doc in the link you sent and I have not had success in any of it. line 12: …/bin/pegasus: cannot execute binary file: Exec format error line 21: …/bin/pegasus: cannot execute binary file: Exec format error line 78: warning: here-document at line 28 delimited by end-of-file (wanted `COMMENT’) line 14: …/bin/pegasus: cannot execute binary file: Exec format error

I take it I need a PC with linux now? It would be great if someone had a yolov7tiny model ready for the demos you provide on the VIM3. I really need to get to the value of my project and spend less hours on compiling and trying to make since of the vast amount of steps to accomplish a test to see if it will run faster than 6 FPS.Any help would be great!

Here is the model I use in Python. Maybe you can make it work in C++.


Hello @BrandonTetra ,

Your convert model by KSNN we can not use, either.

Yes, it needs to convert on PC.

If you only run to test FPS, you can use our model.