2022-01-20 02:26 AM
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 :)
Solved! Go to Solution.
2022-01-20 03:37 AM
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
2022-01-20 03:37 AM
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
2022-01-20 04:45 AM
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
2022-01-20 06:28 AM
After going through the documentation it is clear that some of the tutorials I followed are incorrect as they use older decrepit functions that are no longer used in version 7.1.
My error may also be from trying to initialise the model and run it while I have an application template set in the "Select Components". Does STM have any examples where they specifically use their template?
The code in the docs seem to use some of the templates as functions like "acquire_and_process_data" are used but its contents are not shown.
2022-01-21 02:18 AM
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.