2021-01-19 01:54 AM
Is there any example of a CNN used in CubeIDE? Let me explain better, among the various video tutorials on the ST website and on youtube the demonstrations end with the loading of the neural network and their validation through the functions made available by the IDE.
I need to understand how to manage the network call then inside main.c. On the web I found only one example of how a mono-input and mono-output neural network can be applied, but everything becomes more complicated now that I have to implement a CNN that has a two-dimensional array (spectrogram) at the input.
Can anyone point me to an example or tutorial to follow?
2021-01-19 02:20 AM
To help you develop your own AI solution we provide a set of function packs that are full example applications with source code.
You can look in the Embedded Software list of this page https://www.st.com/content/st_com/en/stm32-ann.html for the function pack that best match your needs (FP-AI-VISION1 or FP-AI-SENSING1)
Regards
Daniel
2021-01-19 02:30 AM
Thank you, I had already started to see FP-AI-SENSING1, in particular the Acoustic Scene Classification example being similar to my implementation.
I am quite inexperienced in this field (I get along much more with Python than with C), but there are some inconsistencies that I don't understand in this example.
the main.c file, in the part relating to the ASC, uses this function for classification:
/ * ASC_Run needs to be called 32 times before it can run the NN and return a classification * /
classification_result = ASC_Run (Proc_Buffer_f);
while in the asc.h file, as I already knew it happened in these cases, a different function is defined:
ai_i32 ai_asc_run (
ai_handle network, const ai_buffer * input, ai_buffer * output);
Can you kindly explain to me why this happens?
2021-02-11 01:37 AM
Hello @SSeas ,
I agree, the FP-AI-SENSING1 example is a bit confusing and not very clear, but here is how it works:
ASC_Run() is called each time a 32 ms audio buffer is received (64 ms buffer with 50% overlap). ASC_Run() performs two things:
For a more basic example (based on CubeIDE), I wrote a tutorial on our wiki, hopefully this will help:
Regards,
Guillaume