Motion Recognition Tutorial - Possible Problems

I’ll be the first to say that I have a very superficial knowledge of all of this, so take it for what it is worth. There appear to be a few issues with the information on the page, though.

The first problem I had was that the Edge Impulse site has changed. They informed me the the Classification block is the learning block I needed, that the only Keras option is something different. Every time I would run it, I would get a runtime error. Choosing the Classification learning block at the top of the list got me to where I could upload it, but it still didn’t work.

From what I could gather, and correct me if I am wrong, the code to test the accelerometer is also firmware for Edge Impulse to see what sensors it is training. The code appears to be for the gyroscope. When I use that code, the frequency of the signals look completely different and it doesn’t work. I changed the code to actually read the accelerometer and the signals look like I expected them to. That got me to the point where it was reading something, but it was reporting the wrong movements.

I noticed that where “result.classification[]” is, the numbers were not in sync with the rest of the code. They are 1, 0, and 2. I changed them to be in order 0,1,2 and viola. Everything works.

Another thing for people who may rely on screenshots to be accurate (ESL), Where it says to add the Spectral block - The screenshot shows the flatten block.

Again, I don’t know enough about it to say it’s wrong, but following the directions certainly didn’t work. If I am wrong, I’ll gladly take the correction. If not, maybe this will help someone else avoid the struggle I did.


Thank you for sharing, we will be rewriting the wiki in the near future

1 Like