0
votes

I'm trying to implement the tutorial [Image recognition on Arm Cortex-M with CMSIS-NN and got this erro:

!mbed compile -m DISCO_F746NG -t GCC_ARM --source . --source ../ML-examples/cmsisnn-cifar10/camera_demo/camera_app/
 Using targets from /content/CMSISNN_Webinar/cmsisnn_demo/mbed/e95d10626187/targets.json
[OS ERROR] Command: /content/GCC-ARM/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gcc --version
 [ERROR] [Errno 8] Exec format error
 [mbed] ERROR: "/usr/bin/python2" returned error.
       Code: 1
       Path: "/content/CMSISNN_Webinar/cmsisnn_demo"
       Command: "/usr/bin/python2 -u /content/CMSISNN_Webinar/cmsisnn_demo/.temp/tools/make.py -t 
 GCC_ARM -m DISCO_F746NG --source . --source ../ML-examples/cmsisnn-cifar10/camera_demo/camera_app/ --build ./BUILD/DISCO_F746NG/GCC_ARM"

   Tip: You could retry the last command with "-v" flag for verbose output

I've searched for other similar issues but I do not found anything to solve it.

I'm trying to run it on the Google Colab and the project is attached.

I hope this script help others newbies like me.

Thanks in advance.

https://github.com/amiltonrsilva/Image-recognition-on-Arm-Cortex-M-with-CMSIS-NN.git

1

1 Answers

0
votes

I had exactly the same problem and didn't make it run. But I made a very similar tutorial run with TensorFlow Lite for the Disco_F746NG. I can only recommend you to switch to TensorFlow Lite. Here are the tutorials explained that worked for me: https://www.tensorflow.org/lite/microcontrollers/get_started An example project which is very similar to the one you tried is here: https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/micro/examples/image_recognition_experimental But I would do the hello world example first, as this is better explained.

There is also a very good book about this topic which I can recommend. You can read the preview here: https://tinymlbook.files.wordpress.com/2020/01/tflite_micro_preview.pdf The same examples from above are explained in this book but in much more detail.

In some of these examples, there are some mistakes / outdated function calls in main.cc: You have to change ms_wait(100) to HAL_Delay(100) and resolver to micro_ops_resolver or something similar. After changing this it worked for me.

I know, that's not exactly an answer to your question, but nonetheless I hope it helps you.