cancel
Showing results for 
Search instead for 
Did you mean: 

X-CUBE-AI

ShivaRagu
Senior

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

1 ACCEPTED SOLUTION

Accepted Solutions
Eleon BORLINI
ST Employee

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

View solution in original post

5 REPLIES 5
Eleon BORLINI
ST Employee

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

MSant.11
Associate III

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

ShivaRagu
Senior

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

ShivaRagu
Senior

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

MSant.11
Associate III

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