VIM3 yolov3 convert issue

@numbqq So I need to flash a new image into VIM3? Can you please provide me the link of the image, so that I flash the right image. I hope this image can also be used for NPU SDK as well.

Hello @Akkisony

You can use this image: https://dl.khadas.com/Firmware/VIM3/Ubuntu/EMMC/VIM3_Ubuntu-gnome-focal_Linux-4.9_arm64_EMMC_V1.0.7-210625.img.xz

@numbqq Thank you for your reply.
I would like to know if the below mentioned error is also related to image flashing. Will this below error also be solved after flashing new image?

khadas@Khadas:~/test/tengine_sdk/tengine_khadas_app/yolov3-picture/cv4_output$ ./tengine_khadas_yolov3_picture -m …/yolov3_u8.tmfile -i …/holes1.png
tengine-lite library version: 1.4-dev
** failed**
** ! mbedtls_net_connect returned -82**

authorise failed ret[-82]

input data:0.0039220
:52:52:0:0
Repeat 1 times, thread 1, avg time 81.88 ms, max_time 81.88 ms, min_time 81.88 ms
--------------------------------------
num_detections,0

@numbqq I flashed a new image and got the following output. I am happy to say that I can see some output this time… Thank you very much for all your support. @Frank @numbqq @alcohol

I have pasted the output below. Can you please tell me what does the bold highlighted text means?
-------------------------------------------------- O U T P U T ---------------------------------------------------------------

khadas@Khadas:~/Tengine/tengine_khadas_app/yolov3-picture/cv4_output$ ./tengine_khadas_yolov3_picture -m yolov3_u8.tmfile -i holes-test1.jpg
tengine-lite library version: 1.4-dev
** failed**
** ! mbedtls_net_connect returned -82**

authorise failed ret[-82]
input data:0.0039220
:52:52:0:0
Repeat 1 times, thread 1, avg time 78.74 ms, max_time 78.74 ms, min_time 78.74 ms

num_detections,39
0: 99%
left = 853,top = 1749
0: 99%
left = 4261,top = 2639
0: 99%
left = 3708,top = 2356
0: 99%
left = 3821,top = 1443
0: 99%
left = 1220,top = 2369
0: 98%
left = 3143,top = 2357
0: 98%
left = 898,top = 2360
0: 98%
left = 4347,top = 1766
0: 98%
left = 4432,top = 1151
0: 98%
left = 3269,top = 782
0: 98%
left = 886,top = 2047
0: 98%
left = 803,top = 721
0: 97%
left = 3193,top = 2049
0: 96%
left = 3213,top = 1757
0: 96%
left = 3842,top = 1133
0: 94%
left = 1144,top = 378
0: 94%
left = 1223,top = 2043
0: 93%
left = 4380,top = 1462
0: 93%
left = 3674,top = 2639
0: 93%
left = 3841,top = 791
0: 92%
left = 1169,top = 721
0: 92%
left = 3219,top = 1130
0: 91%
left = 3899,top = 454
0: 90%
left = 835,top = 1085
0: 89%
left = 4291,top = 2367
0: 89%
left = 3766,top = 1761
0: 89%
left = 3135,top = 2625
0: 89%
left = 795,top = 362
0: 89%
left = 1233,top = 2658
0: 88%
left = 1179,top = 1077
0: 85%
left = 3764,top = 2054
0: 85%
left = 4529,top = 483
0: 83%
left = 3231,top = 1441
0: 80%
left = 917,top = 2661
0: 78%
left = 841,top = 1413
0: 76%
left = 4483,top = 817
0: 72%
left = 1182,top = 1759
0: 61%
left = 1192,top = 1425
0: 61%
left = 3303,top = 435
Unable to init server: Could not connect: Connection refused

(MyWindow:7802): Gtk-WARNING **: 12:40:23.859: cannot open display:


Please give a short description of the bold highlighted text and how do I overcome those error.

I am also unsure if this is utilizing the NPU, as it takes quiet a lot of time to give the output result.

@Akkisony You need to run it with desktop terminal

Thank you!Hello, I am following 如何转换并通过NPU调用自己的模型 | Khadas Documentation to convert my own training yolov3 model.As shown in the screenshot, I need to replace the cfg file, is this the testing cfg file for yolov3 (batch=1) or the training cfg file (batch=64)?2021-07-01 12-25-26 的屏幕截图

@suixing It is batch = 1. Modify the same cfg file with batch=1. You do the training in the host PC, here you do only inference with the khadas board.

@Frank Please can you tell me what does the above output mean? Why is there an output failed!?

@suixing I think it doesn’t matter whether the batch here is 1 or 64. The cfg is quoted here to load the parameters of each layer inside.

@Akkisony I think there is a input error, not a output error. Which parameter you use when you quant model ?

@Frank Please find the screnshot below.
Note that I have changed the parameter to:

-s 0.003922, 0.003922, 0.003922

The Image I attached is not updated with new parameters. Other parameters all remain the same as per the khadas documentation.

Hi AkkiSony,
This is an activity print when tengine was first loaded. This error print means the heartbeat activity failed.

@alcohol Thank you for replying. Thank you please tell me what does activity heart beat fail mean? Please give a brief explanation. And how do I overcome it?

Hi AkkiSony,
The heartbeat activity is used to repport an heartbeat to Tengine activity server, the lib will report an anonymous activity like some android development kit does. If user’s sbc is not allown to connecting to the internet, this fail print will be shown.
if you dislike these as me(a tengine developer), a clean build without heartbeat activity module can be cloned from tengine github.

2 Likes

@alcohol Thank you very much for your explanation! :slight_smile: I was just worried if that has to do something with the output and if it effects the output.

1 Like

@alcohol @Frank As I see in the output, the inference time for yolov3 is approx 78ms. Does this also include, loading the image or just the object detection time?

Hello, when I continue the conversion, after modifying the corresponding script and executing the corresponding script file, the situation in screenshot 1 finally appears, do you know why? Also, as shown in Figure 2, the generated folder is nbg_unify_, not nbg_unify_yolov3 as described in the tutorial. Finally, as shown in Figure 3, vnn_yolov3.h, vnn_post_process.h, vnn_pre_process.h are not generated after opening the directory nbg_unify_, and you know why?

2

@suixing 请把你的三个脚本的内容信息全部贴出来

Thank you!

@suixing 这里的名字,请使用NAME=yolov3而不是NAME=mobilenet_tf --> NAME=yolov3