!bboxes are wrong!

Which Khadas SBC do you use?

Khadas VIM3

Which system do you use? Android, Ubuntu, OOWOW or others?

Ubuntu 20.04

Hi,
I installed Ubuntu 20.04 on Khadas VIM3.
I create “yolov3_nbg_unify” file on computer using aml_npu_sdk. (with ONNX)
I do the conversions using “yolov3_nbg_unify” in Khadas using “aml_npu_app”.
I’m testing the resulting “.so” and “.nb” files in “aml_npu_demo_binaries” and the bounding boxes are wrong.
What could be the reason for this, what method should I follow?

@Frank can you help, thanks?

@gonulsinem where did your yolov3 model come from?

@Frank I trained the yolov3 model on my custom dataset and I converted it to ONNX.

@gonulsinem For custom models, the demo of my source code may not be applicable.If you need, I can provide you the cfg of my yolov3 model

@Frank Hi,

I tried with cfg model from darknet/cfg at master · yan-wyb/darknet · GitHub link but it didn’t give correct results.

While converting the yolov3 model I trained myself, in aml_npu_sdk;

  • “–channel-mean-value” in “$pegasus generate inputmeta” in 0_import_model.sh file,
  • “–quantizer asymmetric_affine --qtype uint8” in “$pegasus quantize” in 1_quantize_model.sh,
  • In the 2_export_case_code.sh file, I am changing the “–optimize VIPNANOQI_PID0X88” sections in the “$pegasus export ovxlib” section “on my own computer”.

I transfer the resulting nbg_unify file to Khadas, make the necessary transformations and obtain the .so file. (Here I set “coco_names and num_class” in “yolov3_process.c” in aml_npu_app and “yolov3_postprocess int size[3]” according to my own dataset.)

I am testing in “aml_npu_demo_binaries” using “.nb” and “.so” file created in Khadas on my own computer and my results are wrong.

I followed all Khadas docs and forum but couldn’t find solution.
Is there any solution you can suggest, it is very important for me.
Thank you.

@Frank can you help?

@gonulsinem Please follow this docs to convert

docs.khadas.com/products/sbc/vim3/npu/npu-convert

Dear @Frank ,
Thanks for your answer.
I have already converted by checking “all” of these files…
but bboxes is not output correctly.
However, when I train my model with darknet and use my own file “cfg” and “weights”, bboxes is output correctly. I did not understand the reason. Problems converting to ONNX?

@gonulsinem I’m also not sure where the problem is. I am more inclined to be that the output data does not fit the bbox