How to transform Yolo model tiny

hello l’m trying to transform Yolotiny model ( weights ,cfg ) >> (nb, so)
but I was faced with error

I tried by referring to this document and succeeded in the Yolo model.
(https://docs.khadas.com/vim3/HowToTransformYolo.html)
but l have to try another things in yolo tiny model?

this is erro code

In file included from vnn_yolotiny.c:16:0:
./include/vnn_yolotiny.h:20:0: warning: “VNN_VERSION_PATCH” redefined
#define VNN_VERSION_PATCH 21
^
In file included from vnn_yolotiny.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_yolotiny.c:16:0:
./include/vnn_yolotiny.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_yolotiny.h:39:11: error: unknown type name ‘vsi_nn_postprocess_map_element_t’
const vsi_nn_postprocess_map_element_t * post_process_map,
^
vnn_yolotiny.c:130:11: error: unknown type name ‘vsi_nn_preprocess_map_element_t’
const vsi_nn_preprocess_map_element_t * pre_process_map,
^
vnn_yolotiny.c:132:11: error: unknown type name ‘vsi_nn_postprocess_map_element_t’
const vsi_nn_postprocess_map_element_t * post_process_map,
^
vnn_yolotiny.c: In function ‘vnn_CreateYolotiny’:
vnn_yolotiny.c:275: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_inpu
^
vnn_yolotiny.c:276:70: error: request for member ‘preprocesses’ in something not a structure or union
pre_process_map[i].preprocess
^
vnn_yolotiny.c:277:70: error: request for member ‘preprocess_count’ in something not a structure or union
pre_process_map[i].preprocess
^
vnn_yolotiny.c:286: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_outp

@111111 Hello,Which is your SDK version and which commit with your app repository ?

hello!
I use aml_npu_sdk_6.4.3 and…

i don’t understand ’ commit your app repositort ’
it mean ’ aml_npu_app-master / DDK_6.4.3 ’ ?

sry, I’ve never done this before, so I’m clumsy.

and
l tried this step

  1. Replace vnn_yolov3.c converted by the conversion tool with vnn_yolov3.c in DDK directory.
  2. Copy the vnn_yolov3.h file converted by the conversion tool and replace the vnn_yolov3.h file under include

@111111 This repository,

Because I submitted an updated code about yolotiny days ago. Maybe you haven’t updated to this commit

hi

I updated DDK it by referring to the commit above. and i use sdk aml_npu_sdk_6.4.3.7z

but i success yolo model build but yolo tiny model no. I used cfg, weight from darknet pre-trained model

Is there anything else I can check?

@111111 Sorry, my yolov3 tiny weight file is train by meself . I don’t use pre-trained model …

oh i think that pre-trained model and train weight file user by myself is just same.

but i have problem

  1. setting 0_imort_model.sh ~~ 2_export case_code.sh and i complete bash
  2. then, i get [ vnn_yolotiny.c, vnn_yolotiny.h, vnn_post/pre_process.c/.h, vnn_global.h, main.c ]
  3. next, i copy a few head file and vnn_yolotiny.c to ddk 6.4.3 yolo_tiny fold
  4. and i have problem this step - [ ./build_vx.sh linux_sdk path ] - .so file make fail

Is there anything I missed? If not, I’ll get the weight file by myself

@111111 Can you check you steps with this page ?

1 Like

Pelase show you error info there

I check above document and i actually success just yolo model but i can’t build only tiny model

./build_vx.sh /home/mjvt/aml_npu_sdk_
6.4.3/linux_sdk/linux_sdk
/home/mjvt/aml_npu_sdk_6.4.3/linux_sdk/linux_sdk/common.target:85: 경고: 타겟 'bin_r/libnn_yolo_tiny.so’에 대한 명령보다 우선합니다
/home/mjvt/aml_npu_sdk_6.4.3/linux_sdk/linux_sdk/common.target:64: 경고: 타겟 ‘bin_r/libnn_yolo_tiny.so’에 대한 과거 명령을 무시합니다
LINK libnn_yolo_tiny.so
/usr/lib/gcc-cross/aarch64-linux-gnu/5/…/…/…/…/aarch64-linux-gnu/bin/ld: bin_r/yolo_tiny_process.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against external symbol __stack_chk_guard@@GLIBC_2.17' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc-cross/aarch64-linux-gnu/5/../../../../aarch64-linux-gnu/bin/ld: bin_r/yolo_tiny_process.o(.text+0x58): unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol __stack_chk_guard@@GLIBC_2.17
/usr/lib/gcc-cross/aarch64-linux-gnu/5/…/…/…/…/aarch64-linux-gnu/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
/home/mjvt/aml_npu_sdk_6.4.3/linux_sdk/linux_sdk/common.target:85: ‘bin_r/libnn_yolo_tiny.so’ 타겟에 대한 명령이 실패했습니다
make: *** [bin_r/libnn_yolo_tiny.so] 오류 1

타겟에 대한 명령이 실패했습니다 << target error