Npu with OpenCV4?

It looks like aml_npu is built with OpenCV3.4.3, which is a kind of outdated.

aml_npu_sdk/linux_sdk/build/sdk$ ll
total 32
drwxrwxr-x 7 khadas khadas 4096 Oct 15  2019 ./
drwxrwxr-x 3 khadas khadas 4096 Oct 15  2019 ../
-rw-rw-r-- 1 khadas khadas 2198 Oct 15  2019 ReadMe.txt
drwxrwxr-x 2 khadas khadas 4096 Oct 15  2019 drivers/
drwxrwxr-x 5 khadas khadas 4096 Oct 15  2019 include/
drwxrwxr-x 2 khadas khadas 4096 Oct 15  2019 nnvxc_kernels/
lrwxrwxrwx 1 khadas khadas   13 Oct 15  2019 opencv3 -> opencv3-3.4.3/
drwxr-xr-x 4 khadas khadas 4096 Oct 15  2019 opencv3-3.4.3/
drwxrwxr-x 2 khadas khadas 4096 Oct 15  2019 ovx12_vxcKernels/

Is it possible for us to build our own NPU_SDK, or ensure the released npm_sdk does NOT rely on any other 3rdparty libraries?

Some demos are based on Opencv 3.4, if you upgrade to OpenCV 4 you will meet many build errors, you need to handle these errors yourself.

It seems the ONLY library dealing with NPU is: galcore.ko ???

@jiapei100 This is NPU driver, but you need to use opencv3.4 to run demo. If you use opencv4, there is no guarantee that there will be any problem. Because the conversion tool is also opencv3.4.

1 Like

@Frank You mean, the model conversion tool based on Tensorflow and onnx-tf ?

That is really hard to build… How did you manage to build Tensorflow or TF-Lite in Khadas? Or you just did cross-build?

And, if there is a khadas package repo for me to install by pip install --user tensorflow ?

@jiapei100 Not , It donesn’t base on TF and ONNX, but it need to use some tf tools .

My train process was use a PC which has install TF1.14 . When I training completed , I will use TF1.10 to convert .