Hi community,
I used SDKv6.4.2.1 to transform my YOLOv3 which was trained for detecting just 1 class object to run on VIM3, but got an error linux_sdk/linux_sdk/common.target:101: bin_r/vnn_yolov3.o] Error 1
on command sudo sh ./build_vx.sh "/home/codelogist/Downloads/Persepolis/Compressed/aml_npu_sdk_6.4.2.1/linux_sdk/linux_sdk"
as well as ./build_vx.sh "/home/codelogist/Downloads/Persepolis/Compressed/aml_npu_sdk_6.4.2.1/linux_sdk/linux_sdk
while running these commands from /aml_npu_app/DDK_6.3.3.4/detect_library/model_code/detect_yolo_v3
. I followed https://docs.khadas.com/vim3/HowToTransformYolo.html and converted the yolo weights into .nb
and copied yolov3.nb, vnn_yolov3.c, vnn_yolov3.h
into folders they are told to. Altough while running ./2_export_case_code.sh
I got a Warning about no .lib file to be removed
so I just removed *.lib
from the last line of 2_export_case_code.sh
. The stack trace is given below for ./build_vx.sh
:
/home/codelogist/Downloads/Persepolis/Compressed/aml_npu_sdk_6.4.2.1/linux_sdk/linux_sdk/common.target:85: warning: overriding recipe for target 'bin_r/libnn_yolo_v3.so'
/home/codelogist/Downloads/Persepolis/Compressed/aml_npu_sdk_6.4.2.1/linux_sdk/linux_sdk/common.target:64: warning: ignoring old recipe for target 'bin_r/libnn_yolo_v3.so'
COMPILE /home/codelogist/Downloads/Persepolis/Compressed/aml_npu_app/DDK_6.3.3.4/detect_library/model_code/detect_yolo_v3/vnn_yolov3.c
In file included from vnn_yolov3.c:16:0:
./include/vnn_yolov3.h:19:0: warning: "VNN_VERSION_MINOR" redefined
#define VNN_VERSION_MINOR 1
In file included from vnn_yolov3.c:15:0:
./include/vnn_global.h:32:0: note: this is the location of the previous definition
#define VNN_VERSION_MINOR 0
In file included from vnn_yolov3.c:16:0:
./include/vnn_yolov3.h:20:0: warning: "VNN_VERSION_PATCH" redefined
#define VNN_VERSION_PATCH 21
In file included from vnn_yolov3.c:15:0:
./include/vnn_global.h:33:0: note: this is the location of the previous definition
#define VNN_VERSION_PATCH 10
In file included from vnn_yolov3.c:16:0:
./include/vnn_yolov3.h:37:11: error: unknown type name ‘vsi_nn_preprocess_map_element_t’
const vsi_nn_preprocess_map_element_t * pre_process_map,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/vnn_yolov3.h:39:11: error: unknown type name ‘vsi_nn_postprocess_map_element_t’
const vsi_nn_postprocess_map_element_t * post_process_map,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vnn_yolov3.c:130:11: error: unknown type name ‘vsi_nn_preprocess_map_element_t’
const vsi_nn_preprocess_map_element_t * pre_process_map,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vnn_yolov3.c:132:11: error: unknown type name ‘vsi_nn_postprocess_map_element_t’
const vsi_nn_postprocess_map_element_t * post_process_map,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vnn_yolov3.c: In function ‘vnn_CreateYolov3’:
vnn_yolov3.c:288:77: error: request for member ‘graph_input_idx’ in something not a structure or union
status = vsi_nn_AddGraphPreProcess(graph, pre_process_map[i].graph_input_idx,
^
vnn_yolov3.c:289:70: error: request for member ‘preprocesses’ in something not a structure or union
pre_process_map[i].preprocesses,
^
vnn_yolov3.c:290:70: error: request for member ‘preprocess_count’ in something not a structure or union
pre_process_map[i].preprocess_count);
^
vnn_yolov3.c:299:80: error: request for member ‘graph_output_idx’ in something not a structure or union
status = vsi_nn_AddGraphPostProcess(graph, post_process_map[i].graph_output_idx,
^
vnn_yolov3.c:300:73: error: request for member ‘postprocesses’ in something not a structure or union
post_process_map[i].postprocesses,
^
vnn_yolov3.c:301:73: error: request for member ‘postprocess_count’ in something not a structure or union
post_process_map[i].postprocess_count);
^
vnn_yolov3.c:145:29: warning: unused variable ‘data’ [-Wunused-variable]
uint8_t * data;
^~~~
At top level:
vnn_yolov3.c:94:17: warning: ‘load_data’ defined but not used [-Wunused-function]
static uint8_t* load_data
^~~~~~~~~
make: *** [/home/codelogist/Downloads/Persepolis/Compressed/aml_npu_sdk_6.4.2.1/linux_sdk/linux_sdk/common.target:101: bin_r/vnn_yolov3.o] Error 1
Although, when I used SDKv6.4.0.10 to generate .nb, .c and .h
files and used linux_dir
argument as the path of linux_sdk
from SDKv6.4.0.10 it was able to generate vnn_yolov3.o
and .so
files into bin_r
folder.
Can anyone please guide me to solution for this? I don’t know why is this happening, also the the size of yolov3.data
file generated by older SDK is larger than generated by newer sdk, the difference is about 100MB. I don’t know is it relevant or not.
I think the documentation on: https://docs.khadas.com/vim3/HowToTransformYolo.html#Build-the-source-code is out-dated as we don’t need path/to/fenix_dir
now, there are lot of changes made after that, also there are lot of DDK versions available in aml_apu_app
, when to use which one is pretty confussing. Also, there is change in 1_quantize_model.sh
and 2_export_case_code.sh
files, are they causing the issue?
Can someone clearify my doubts please :)?
Regards.