Skip to main content
KSOdin2
Associate III
January 20, 2022
Solved

Will STM be uploading more updated videos/guides on how to use the CUBE AI, and Onnx models

  • January 20, 2022
  • 2 replies
  • 1942 views

I've been working with the Cube AI package recently and I think it is amazing and has got soo much potential. I find for most ML it is done on a computer or cloud but STM has given us another approach that I think will work very well.

My issue with Cube AI is that all videos online are >1 year old and use older versions. As well non-show how to use Onnx format ML models as examples just use TensorFlow lite. As well I've really struggled to find good documentation and examples for Cube AI, and the examples in the repository are OK but don't work and I feel like need more explanation.

Will there be more videos, documents coming in the future?

Are there any documents, websites or videos I should watch to help me as I may have missed them?

Thanks to anyone who directs me in the right direction :)

    This topic has been closed for replies.
    Best answer by fauvarque.daniel

    I guess you already know of the embedded documentation in the tool

    It is located under your home directory

    ~/STM32Cube/Repository/Pack/STMicroelectronics/X-CUBE-AI/7.1.0/Documentation/index.html

    It can also be directly accessed from STM32CubeMX using Help->X-Cube-AI Documentation. The menu option is available once you have opened a project in STM32CubeMX with the X-Cube-AI pack enabled in the project

    UM2526 on the st.com web site details the UI usage (it is available from the X-Cube-AI st.com web page)

    Regards

    2 replies

    fauvarque.daniel
    fauvarque.danielBest answer
    ST Employee
    January 20, 2022

    I guess you already know of the embedded documentation in the tool

    It is located under your home directory

    ~/STM32Cube/Repository/Pack/STMicroelectronics/X-CUBE-AI/7.1.0/Documentation/index.html

    It can also be directly accessed from STM32CubeMX using Help->X-Cube-AI Documentation. The menu option is available once you have opened a project in STM32CubeMX with the X-Cube-AI pack enabled in the project

    UM2526 on the st.com web site details the UI usage (it is available from the X-Cube-AI st.com web page)

    Regards

    KSOdin2
    KSOdin2Author
    Associate III
    January 20, 2022

    I know of the embedded documentation. I have been using the "Embedded Inference Client API

    " to try and get my code to work and use it as the foundation for my code. That example code works well but unfortunately does not work at the moment for me as I get a Type 19 error which is AI_ERROR_CODE_INVALID_FORMAT. This is the main reason I wanted examples to see if I was doing the input/output right.

    Maybe the Embedded inference may not be enough. I will read through all of the documents in the repository to see what other files say.

    If found the UM2526 was good, just no Onnx examples and I'm worried that's where I am going wrong as I am writing my code based on TensorFlow examples.

    Thank you for replying to me Fauvarque

    KSOdin2
    KSOdin2Author
    Associate III
    January 21, 2022

    Solved my issue. I stopped writing my code in the main and instead used the template. I believe that I was using variables that were declared in the template which was causing issues. Other than that I don't know what else was up. The template has done a good job of setting up the variables correctly, I may have done it wrong.

    I recommend using the template if you are having issues. The only problem with the template is that I can not set the input and outputs buffers values to float with the code generation. I must do it manually by changing all ai_i8 to ai_float t. Then I must change the AI_MODEL_IN/OUT_SIZE_BYTES to AI_MODEL_IN/OUT_SIZE as this will change it to a float size. The only problem with this is that if I regenerated the code it might overwrite and remove my changes.

    If anyone finds a way to have the code generate a float format rather than ai_i8 let me know.