NPU Demo and source code

@Frank I want to understand the meaning of GPUIDLECYCLES and GPUTOTALCYCLES in context when we have multiple processes running
let’s say if we have 3 processes running concurrently, and after the inference of each image galcore logs throw out the GPUTOTALCYLCES and GPUIDLECYCLES at the end of the inference.

So, my question is that are these values global with respect to a sample of time slots or are these values with respect to each process?

2 options of the meaning:
global result: for 3 concurrent processes and a specific timestamp of 10ms we get the galcore log output → GPUIDLECYCLES & GPUTOTALCYCLES for all processes concurrently
per process result: for each process and each image inference we get the galcore log output → GPUIDLECYCLES & GPUTOTALCYCLEDS for each process and per image independent of other images running concurrently

@Frank I am converting a tflite model using the conversion scripts provided by khadas, but I see the following logs. Could you please help me understand, if there is any issue during the conversion of the model.

Also, do we need to do de-quantization after we have done the inference, because after quantization of the model it results the output in int8 format, but I need it in float32 format.

Could you please suggest how could I resolve it?

@Frank @numbqq When I run the demo, I am able to get the output, however, I am not able to visualize the image like seen on the demo. Do you have any reason or solution please? I would like to visualize the result of object detection.

@Frank @numbqq
I tried to convert my Yolov3 model to make it compatible with NPU, however, I am not getting the result.
I used aml_npu_app to convert the model.

Can you aslo please tell me if I can do the same with Tengine SDK and aml_npu_nnsdk as I was not successful with aml_npu_app?

Thank you! :slight_smile:

You sure? The aml_npu_app repo is the converted ready to use C code, you just need to compile and run.

For model conversion, you need to use NPU SDK.

Yes, you can. Check here:

I am sorry, I used NPU SDK to convert the code.

So the below two mentioned links are also similar to NPU SDK? Do they have the same functionality.

  1. https://docs.khadas.com/vim3/HowToUseTengineSDK.html
  2. https://docs.khadas.com/vim3/HowToUseAMLNNApi.html

Can we convert our model using the mentioned above links?

You can use Tengine SDK.

https://docs.khadas.com/vim3/HowToUseTengineSDK.html

Amlogic NN Libraries are ready to use model and C code, don’t used for model conversion.

@numbqq Thank you so much for replying spontaneous.

I did not understand the below statement in the documentation.

Prepare photo gallery
A certain amount of pictures need to be used for quantification

What pictures are needed?Can we provide training pictures? Please can you tell me what dataset is this talking about?

我遇到了一个类似的问题,报错如下:
./detect_demo: symbol lookup error: /lib/aarch64-linux-gnu/libgtk-3.so.0: undefined symbol: g_mount_operation_set_is_tcrypt_hidden_volume
请问这有什么解决方向的建议吗

您好 我遇到了一个类似的问题,报错如下:
./detect_demo: symbol lookup error: /lib/aarch64-linux-gnu/libgtk-3.so.0: undefined symbol: g_mount_operation_set_is_tcrypt_hidden_volume
请问这有什么解决方向的建议吗

@qixiji 你在板子上运行的么,是最新的系统和最新的demo么

Type “help”, “copyright”, “credits” or “license” for more information.
import cv2
Traceback (most recent call last):
File “”, line 1, in
ImportError: /lib/aarch64-linux-gnu/libgtk-3.so.0: undefined symbol: g_mount_operation_set_is_tcrypt_hidden_volume

好像问题是关于opencv的

@qixiji

现在在测试一些是以前的版本

最新的是没有问题

@qixiji 旧版本不确定问题在哪里,sdk和demo和系统,包括opencv的版本都进行了升级

首先看一下你内核编译了npu 还有设备树是否使能 如果编译成模块 你把galcore加载进去

Why does NPU usage depend on GPU. Does it mean some part of model is executed on GPU ??

Hi, I must ask from where you have ordered indoor drone?I recommend is Khadas VIM3. Because of my non-standard neural network implementation, the NPU on the VIM3 is not suitable for me but it may be suitable for you.

NB: The Khadas VIM3 NPU uses floating-point weights and biases. Mine doesn’t.

The case is the solid aluminium variety with dual cooling fans. This provides both low power cooling and relatively high efficiency. This offsets the higher power consumption of the Pi4.

1 Like

Although the above are all GPU, they are all independent NPU and have nothing to do with GPU.