Dear xiaodong
I compile the 5.4.70 AI robot ROS image using the command "bitbake imx-robot-sdk" ,and I update the OS image with UUU tool, i can brinig up the AI robot EVK successully .
Then I use the command "bitbake imx-robot-system -c populate_sdk" to generate the SDK , i have installed the SDK in my X86 ubuntu 18.04 .
Then I download the tensorflow lite v2.3.1 source code :
git clone https://github.com/tensorflow/tensorflow.git
git checkout v2.3.1
cd /4Tdisk/king/NXP/King_application/tensorflow/tensorflow/lite/examples/label_image/
Compiled the label_image successfully using the command below :
$CC label_image.cc bitmap_helpers.cc ../../tools/evaluation/utils.cc -I=/usr/include/tensorflow/lite/tools/make/downloads/flatbuffers/include \
-I=/usr/include/tensorflow/lite/tools/make/downloads/absl -O1 -DTFLITE_WITHOUT_XNNPACK -ltensorflow-lite -lstdc++ -lpthread -lm -ldl -lrt
After i get the label_image output application a.out , I copy it to the AI robot EVK .
It can run successufly using the CPU .
But can not use the NNAPI accelerate .
But the Yocot pre-build label_image can use the NNAPI accelerate .
How can i debug this issue?
Solved! Go to Solution.
We must use the label_image source code located in the yocto bitbake path , then it can use the NNAPI acceleration .
For the label_image source code download from tensorflow lite website , it is different from the one in Yocto BSP .
Can you be more specific where I can find the version of label_image source code that works with NNAPI acceleration, thanks.
Current i.MX Yocto don't support Tensorflow with NPU accelerate(I don't think it will be supported in future). You need to add tensorflow-lite into variable IMAGE_INSTALL in imx-robot-sdk.bb when you want to deploy model trained and converted by TensorFlow tools.
BTW, I already add ML packages (include tensorflow-lite) in imx-robot-sdk.bb in last i.MX robot platform.
Please the below update
/////////////////////////////////////// update for v1.0-L5.4.70-2.3.2 ///////////////////////////////////////////////////////////
Good