Hi I already trained my own custom yolov3 model so I got yolov3.cfg and yolov3.weights.
I’ve downloaded SDK 6.4.4.3 version and tried to convert my own model by following How to convert and call your own model through NPU | Khadas Documentation.
I’ve run 0_import_model.sh so that I got yolov3.json and yolov3.data
However when I tried next step (which is 1_quantize_model.sh) I got some errors like this.
W:tensorflow:From acuitylib/app/tensorzone/workspace.py:26: py_func (from tensorflow.python.ops.script_ops) is deprecated and will be removed in a future version.
Instructions for updating:
tf.py_func is deprecated in TF V2. Instead, there are two
options available in V2.
- tf.py_function takes a python function which manipulates tf eager
tensors instead of numpy arrays. It’s easy to convert a tf eager tensor to
an ndarray (just call tensor.numpy()) but having access to eager tensors
means tf.py_functions can use accelerators such as GPUs as well as
being differentiable using a gradient tape.
- tf.numpy_function maintains the semantics of the deprecated tf.py_func
(it is not differentiable, and manipulates numpy arrays). It drops the
stateful argument making all functions stateful.
I Fitting image with scale.
E Please set source and dataset into to workspace.
I ----------------Warning(0)----------------
Traceback (most recent call last):
File “tensorzonex.py”, line 450, in
File “tensorzonex.py”, line 387, in main
File “acuitylib/app/tensorzone/validator.py”, line 113, in run
File “acuitylib/app/tensorzone/workspace.py”, line 176, in _setup_provider
File “acuitylib/acuitylog.py”, line 251, in e
ValueError: Please set source and dataset into to workspace.
[3138] Failed to execute script tensorzonex
I’ve already done that you mentioned on that website like Modify 0_import_mode1.sh, 1_quantize_model.sh, Modify 2_export_case_code. But I guess I did something wrong while doing following things.
@Frank Hi me again Unfortunately I have another problem.
You told me that I don’t have to change verification file of the picture so I didn’t change validation_tf.text which is about spaceship.jpg.
Anyway everything work perfectly except 2_export_case_code.sh. When I run 2_export_case_code.sh by command “bash 2_export_case_code.sh” I got a message like this.
D Generate fake input /content/drive/MyDrive/Khadas/aml_npu_sdk_6.4.4.3/acuity-toolkit/demo/input_0.tensor
gcc -Wall -std=c++0x -I. -I…/bin/vcmdtools/include/ -I…/bin/vcmdtools/include/CL -I…/bin/vcmdtools/include/VX -I…/bin/vcmdtools/include/ovxlib -D__linux__ -DLINUX -O3 -c vnn_pre_process.c
cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C
gcc -Wall -std=c++0x -I. -I…/bin/vcmdtools/include/ -I…/bin/vcmdtools/include/CL -I…/bin/vcmdtools/include/VX -I…/bin/vcmdtools/include/ovxlib -D__linux__ -DLINUX -O3 -c vnn_post_process.c
cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C
gcc -Wall -std=c++0x -I. -I…/bin/vcmdtools/include/ -I…/bin/vcmdtools/include/CL -I…/bin/vcmdtools/include/VX -I…/bin/vcmdtools/include/ovxlib -D__linux__ -DLINUX -O3 -c vnn_yolov3.c
cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C
gcc -Wall -std=c++0x -I. -I…/bin/vcmdtools/include/ -I…/bin/vcmdtools/include/CL -I…/bin/vcmdtools/include/VX -I…/bin/vcmdtools/include/ovxlib -D__linux__ -DLINUX -O3 -c main.c
cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C
gcc -Wall -std=c++0x -I. -I…/bin/vcmdtools/include/ -I…/bin/vcmdtools/include/CL -I…/bin/vcmdtools/include/VX -I…/bin/vcmdtools/include/ovxlib -D__linux__ -DLINUX -O3 -O3 vnn_pre_process.o vnn_post_process.o vnn_yolov3.o main.o -L…/bin/vcmdtools/lib -lOpenVX -lOpenVXU -lCLC -lVSC -lGAL -lovxlib -lEmulator -lvdtproxy -L…/bin/vcmdtools/lib/vsim -lOpenVX -lOpenVXU -lCLC -lVSC -lGAL -lovxlib -lEmulator -lvdtproxy -L…/bin/vcmdtools/lib/x64_linux -lOpenVX -lOpenVXU -lCLC -lVSC -lGAL -lovxlib -lEmulator -lvdtproxy -L…/bin/vcmdtools/lib/x64_linux/vsim -lOpenVX -lOpenVXU -lCLC -lVSC -lGAL -lovxlib -lEmulator -lvdtproxy …/bin/vcmdtools/lib/libjpeg.a -o gen_nbg
Create Neural Network: 197ms or 197494us
Verify…
Verify Graph: 23711ms or 23711181us
Start run graph [1] times…
Run the 1 time: 561.00ms or 561936.00us
vxProcessGraph execution time:
Total 562.00ms or 562020.00us
Average 562.02ms or 562020.00us
— Top5 —
0: 0.000000
1: 0.000000
2: 0.000000
3: 0.000000
4: 0.000000
mv: ‘/content/drive/MyDrive/Khadas/aml_npu_sdk_6.4.4.3/acuity-toolkit/demo/network_binary.nb’ and ‘/content/drive/MyDrive/Khadas/aml_npu_sdk_6.4.4.3/acuity-toolkit/demo/network_binary.nb’ are the same file
mv: ‘/content/drive/MyDrive/Khadas/aml_npu_sdk_6.4.4.3/acuity-toolkit/demo/input_0.dat’ and ‘/content/drive/MyDrive/Khadas/aml_npu_sdk_6.4.4.3/acuity-toolkit/demo/input_0.dat’ are the same file
mv: ‘/content/drive/MyDrive/Khadas/aml_npu_sdk_6.4.4.3/acuity-toolkit/demo/output0_13_13_21_1.dat’ and ‘/content/drive/MyDrive/Khadas/aml_npu_sdk_6.4.4.3/acuity-toolkit/demo/output0_13_13_21_1.dat’ are the same file
mv: ‘/content/drive/MyDrive/Khadas/aml_npu_sdk_6.4.4.3/acuity-toolkit/demo/output1_26_26_21_1.dat’ and ‘/content/drive/MyDrive/Khadas/aml_npu_sdk_6.4.4.3/acuity-toolkit/demo/output1_26_26_21_1.dat’ are the same file
mv: ‘/content/drive/MyDrive/Khadas/aml_npu_sdk_6.4.4.3/acuity-toolkit/demo/output2_52_52_21_1.dat’ and ‘/content/drive/MyDrive/Khadas/aml_npu_sdk_6.4.4.3/acuity-toolkit/demo/output2_52_52_21_1.dat’ are the same file
I Dump nbg input meta to /content/drive/MyDrive/Khadas/aml_npu_sdk_6.4.4.3/acuity-toolkit/demo_nbg_unify/nbg_meta.json
I Save vx network source file to /content/drive/MyDrive/Khadas/aml_npu_sdk_6.4.4.3/acuity-toolkit/demo_nbg_unify/vnn_yolov3.c
I Save vx network source file to /content/drive/MyDrive/Khadas/aml_npu_sdk_6.4.4.3/acuity-toolkit/demo_nbg_unify/vnn_yolov3.h
I Save vx network source file to /content/drive/MyDrive/Khadas/aml_npu_sdk_6.4.4.3/acuity-toolkit/demo_nbg_unify/vnn_post_process.c
I Save vx network source file to /content/drive/MyDrive/Khadas/aml_npu_sdk_6.4.4.3/acuity-toolkit/demo_nbg_unify/vnn_post_process.h
I Save vx network source file to /content/drive/MyDrive/Khadas/aml_npu_sdk_6.4.4.3/acuity-toolkit/demo_nbg_unify/vnn_pre_process.c
I Save vx network source file to /content/drive/MyDrive/Khadas/aml_npu_sdk_6.4.4.3/acuity-toolkit/demo_nbg_unify/vnn_pre_process.h
I Save vx network source file to /content/drive/MyDrive/Khadas/aml_npu_sdk_6.4.4.3/acuity-toolkit/demo_nbg_unify/vnn_global.h
I Save vx network source file to /content/drive/MyDrive/Khadas/aml_npu_sdk_6.4.4.3/acuity-toolkit/demo_nbg_unify/main.c
I Save vx network source file to /content/drive/MyDrive/Khadas/aml_npu_sdk_6.4.4.3/acuity-toolkit/demo_nbg_unify/BUILD
I Save vx network source file to /content/drive/MyDrive/Khadas/aml_npu_sdk_6.4.4.3/acuity-toolkit/demo_nbg_unify/yolov3.vcxproj
I Save vx network source file to /content/drive/MyDrive/Khadas/aml_npu_sdk_6.4.4.3/acuity-toolkit/demo_nbg_unify/makefile.linux
I Save vx network source file to /content/drive/MyDrive/Khadas/aml_npu_sdk_6.4.4.3/acuity-toolkit/demo_nbg_unify/.cproject
I Save vx network source file to /content/drive/MyDrive/Khadas/aml_npu_sdk_6.4.4.3/acuity-toolkit/demo_nbg_unify/.project
/content/drive/MyDrive/Khadas/aml_npu_sdk_6.4.4.3/acuity-toolkit/demo_nbg_unify
customer:input,0,0:output,0,1:output,1,2:output,2,3:
/content/drive/MyDrive/Khadas/aml_npu_sdk_6.4.4.3/acuity-toolkit/demo_nbg_unify
I ----------------Warning(0)----------------
rm: cannot remove ‘*.lib’: No such file or directory
My yolov3 model is for detect fallen Person and normal Person. I think that’s because all of the Top 5 has 0 value(since image is for spaceship) or not. And why *.lib file doesn’t exist?
@Frank Oh and If I ignore that rm: cannot remove ‘*.lib’: No such file or directory and I keep doing what is written on How to convert and call your own model through NPU | Khadas Documentation.
when I d ./build_vx.sh I got an error message /bin/bash: ./build_vx.sh: /bin/bash: bad interpreter: Permission denied So I change command into bash build_vx.sh I got an another error message
COMPILE /content/drive/MyDrive/Khadas/aml_npu_app/DDK_6.3.3.4/detect_library/model_code/detect_yolo_v3/yolov3_process.c
make: aarch64-linux-gnu-gcc: Command not found
makefile.linux:50: recipe for target ‘bin_r/yolov3_process.o’ failed
make: *** [bin_r/yolov3_process.o] Error 127