Hi im new and im pretty lost

Question/Issue:
Hi, Im new at tinyML and never used Edge Impulse before. Ihave deployed my NN with some accelerometer samples and the results are good but I have lots of questions.
Im working on a uC using STM32cubeIDE and the language is C++.
My samples were 2seconds long and sampled with 62.5Hz freq (16ms intervals) so each axis has 125 samples, as there are 3 axis my input buffer size is 375.
To test this, i pasted 10 different raw data values (using some flash memory) and runned the classification for each one of them but in a real application this would make non sense, so I was wondering some stuff:
1-If there was any possibility to use smaller samples such as 50 samples per axis.
2-Can i use data sampled at different frequencies, and if so how coul i implement it?
3-Can the neural network work in real time (i mean step by step) as data is being send by the sensor?
Thank you so much.
Josu
Project ID:
109266
Context/Use case:

Hi @JosuGaztelu,

  1. Yes, in the “Impulse Design” window, you can adjust the Window size and sampling frequency to change the number (and sample rate) of values per sample window. See this document for more information for how the windows work: https://docs.edgeimpulse.com/docs/edge-impulse-studio/create-impulse
  2. See above ^^^. The same document talks about how to adjust the sample frequency in your project. You want the sampling frequency on your microcontroller to match the sampling frequency in your Edge Impulse project.
  3. I’m not sure I follow what you mean by this. Generally, there are two ways to handle real-time inference on a microcontroller. The simplest is to use a superloop: spend time sampling the full window (data stored in a buffer), send that buffer to the Edge Impulse library to perform inference, read the inference results and perform an action based on those results. The other is to use interrupts and DMA to continuously fill a buffer in the background while performing inference. This is a good document that talks about the different ways to perform inference: Continuous audio sampling - Edge Impulse Documentation

Hope that helps!

1 Like