Skip to main content
Visitor II
October 12, 2021
Solved

X-CUBE-AI

  • October 12, 2021
  • 5 replies
  • 1659 views

hi, am doing a keyword spotting in SensorTile_Box. I have done TFlite model and analyzed in MX tool, generated C code. Now, I want to know where the execution takes place. I want to use LED when it recognizes the voice. But, I didn't know where to write the code led to respond to voice.

Can you help please?

Regards,

shankari

    This topic has been closed for replies.
    Best answer by Eleon BORLINI

    Hi shankari,

    You might start from a sample project/code, for example the FP-AI-SENSING1 function pack, that supports also projects running on the Sensortile.box.

    You can find some examples in \Projects\STM32L4R9ZI-SensorTile.box\Applications\SENSING1 folder.

    In particular, middleware libraries generated thanks to STM32CubeMx extension called X-CUBE-AI featuring example implementation of neural networks for real-time:

    • human activity recognition (HAR)
    • acoustic scene classification (ASC) --> this might be of your interest

    You need these files:

    0693W00000FCK1SQAX.pngThe green LED can be simply managed toggling the proper GPIO (e.g. the PF2 for the green led), as shown in the schematic below.

    0693W00000GWc9iQAD.png 

    -Eleon

    5 replies

    ST Employee
    November 5, 2021

    Hi shankari,

    You might start from a sample project/code, for example the FP-AI-SENSING1 function pack, that supports also projects running on the Sensortile.box.

    You can find some examples in \Projects\STM32L4R9ZI-SensorTile.box\Applications\SENSING1 folder.

    In particular, middleware libraries generated thanks to STM32CubeMx extension called X-CUBE-AI featuring example implementation of neural networks for real-time:

    • human activity recognition (HAR)
    • acoustic scene classification (ASC) --> this might be of your interest

    You need these files:

    0693W00000FCK1SQAX.pngThe green LED can be simply managed toggling the proper GPIO (e.g. the PF2 for the green led), as shown in the schematic below.

    0693W00000GWc9iQAD.png 

    -Eleon

    Visitor II
    December 31, 2021

    Hello,

    I face a very similar challenge: the asc_data.c holds the inference matrix, e.g.

    0693W00000HqH8EQAV.png 

    How can I generate an inference that suits the same release used in FP-AI-SENSING1 ?

    I have a two-class model inference.

    Thanks,

    M

    ShivaRaguAuthor
    Visitor II
    January 4, 2022

    its better to use 3-classes, since the function pack they have used 3 classes-( indoor, outdoor and vehicle).

    Can you tell me what is the duration of the dataset u have used?

    Are you using the same Python script for the model creation which ST use?

    If you want match exactly with the function pack, I think you have to used the same python script by changing the classes.

    Also, use the exact version which they used in function pack.

    Keras---2.2.4

    Tensor flow---1.14.0

    Librosa---0.8.0

    STM32MX CUBE- 5.0

    X-CUBE AI-4.1.0

    Thanks,

    Shankari

    ShivaRaguAuthor
    Visitor II
    January 4, 2022

    Also, its better to use TFlite models to match with the inference matrix.

    Visitor II
    January 11, 2022

    Hello Shankari,

    Thanks for your suggestions. I use a dataset of 5-sec-long audio recordings.

    I have used the same Python script available in FP- AI-SENSING1, but I realized a two-class NN.

    Did you ever test Wavelet scattering for audio signals ?

    Regards,

    Marco