How to transform Yolo Model - https://docs.khadas.com/vim3/HowToTransformYolo.html
You can find those in darnknet website ,or you can train it by yourself .
@Frank, @numbqq , It’s weird. It seems that the tool does not generate a case code correctly.
After modifying the below three script files for Yolov3, I tried to run the scripts files.
- 0_import_model.sh
- 1_quantize_model.sh
- 2_export_case_code.sh
Then, I could get the below case code files in the “nbg_unify_yolov3” folder as follows.
However, the post-process files (e.g., vnn_post_process.c and vnn_post_process.h) for Yolov3 model are incorrect. Can I get the latest “aml_npu_sdk.tgz” file that solve this issue? How can I fix this issue? Welcome to an hints and similar experience.
drwxrwxr-x 2 invain invain 4096 3월 16 09:15 .
drwxr-xr-x 6 invain invain 4096 3월 16 09:13 …
-rw-rw-r-- 1 invain invain 37763 3월 16 09:08 .cproject
-rw-rw-r-- 1 invain invain 2189 3월 16 09:08 .project
-rw-rw-r-- 1 invain invain 567 3월 16 09:08 BUILD
-rw-rw-r-- 1 invain invain 5839 3월 16 09:08 main.c
-rw-rw-r-- 1 invain invain 1995 3월 16 09:08 makefile.linux
-rw-rw-r-- 1 invain invain 358 3월 16 09:08 vnn_global.h
-rw-rw-r-- 1 invain invain 3561 3월 16 09:08 vnn_post_process.c
-rw-rw-r-- 1 invain invain 459 3월 16 09:08 vnn_post_process.h
-rw-rw-r-- 1 invain invain 20326 3월 16 09:08 vnn_pre_process.c
-rw-rw-r-- 1 invain invain 1284 3월 16 09:08 vnn_pre_process.h
-rw-rw-r-- 1 invain invain 7934 3월 16 09:08 vnn_yolov3.c
-rw-rw-r-- 1 invain invain 965 3월 16 09:08 vnn_yolov3.h
-rw-rw-r-- 1 invain invain 62057472 3월 16 09:08 yolov3.nb
-rw-rw-r-- 1 invain invain 12676 3월 16 09:08 yolov3.vcxproj
-
https://gitlab.com/khadas/aml_npu_app.git (source files): (./DDK_6.3.3.4/detect_library/model_code/detect_yolo_v3/ )
-
https://gitlab.com/khadas/aml_npu_demo_binaries.git (Only ELF binaries)
2.1. detect_demo_uvc (source code): https://gitlab.com/numbqq/aml_npu_app/tree/master/detect_library/yoloface_demo_gst_uvc
2.2. detect_demo_mipi (source code): https://gitlab.com/numbqq/aml_npu_app/tree/master/detect_library/yoloface_demo_mipi
At that time, I exepcted that the output message would be displayed as follows.
. . . Omission . . .
Loading weights from yolov3.weights…Done!
data/dog.jpg: Predicted in 0.029329 seconds.
dog: 99%
truck: 93%
bicycle: 99%
However, when I checked the Line 116,126 at the vnn_post_process.c file,
The output template is not correct.
116 printf(" — Top5 —\n");
117 for(i=0; i<5; i++)
118 {
119 printf("%3d: %8.6f\n", MaxClass[i], fMaxProb[i]);
120 }
121 status = VSI_SUCCESS;
122
123 final:
124 if(tensor_data)vsi_nn_Free(tensor_data);
125 if(buffer)free(buffer);
126 return status;
After generating the case code files, do I have to always combine files between case code (yolov3.nb, vnn_yolov3.c, and vnn_yolov3.h) and ./aml_npu_app/DDK_6.3.3.4/detect_library/model_code/detect_yolo_v3/* manually?
When can I use automatically geneated case code such as the existing Inceptionv3’s case code instead of the manual combination?
BRs,
Geunsik Lim