Motion recognition of a single flick

Question/Issue:
Using the motion recognition with anomaly detection guide, I created a model that detects gestures if you do them at least two times in a row. However, I’m trying to create a model that can detect a gesture from a single quick motion, and my current model is not accurate enough for that. For example, one rapid counterclockwise rotation on the Z axis should be interpreted as a gesture, and one rapid clockwise rotation on the same axis should be interpreted as a different gesture. Do you have any advice on how to accomplish this?

Project ID:
1105093

Context/Use case:
Gesture recognition in an embedded device

Steps Taken:

  1. Follow the motion recognition guide
  2. Attempt to use the model to detect a gesture from a single flick of the device.

Expected Outcome:
The model should be able to detect the gesture from a single flick.

Actual Outcome:
The model is often incorrect until you do the same flick at least twice.

Environment:

  • Platform: nRF52832
  • Build Environment Details: C++
  • OS Version: Linux (NixOS)
  • Edge Impulse Version (Firmware): 1.95.11
  • Edge Impulse CLI Version: NA
  • Project Version: 12
  • Custom Blocks / Impulse Configuration:
    • Window size: 2000 ms
    • Window increase: 80 ms

Hello @Anthony24851

Thanks for sharing the project you are working on!

Could you please share more details of the dataset that you have? And some of the classes and motions recorded?

I think we can start helping you from there!

Thanks

I created the dataset myself by collecting accelerometer and gyroscope data from the device. As directed by the motion recognition guide, I collected about 3 minutes of data for each gesture, with each sample being about 10 seconds long. The data frequency is 50 Hz. I repeated the gesture for the entirety of each sample, as shown here:


And here:

It’s possible that the model requires repeated motions because the window size covers more than one motion in each sample. However, I got very similar results when I decreased the window size from 2 seconds to 1 second.
Most of the gestures I created should be very easy to tell apart because I made fast rotations on different axes. In fact, most of the gestures are named based on which axis I am rotating on. I was hoping the model would have no problem with these basic gestures and I would be able to focus my effort on adding more complicated gestures.

Thanks for your help!

Here is the link to the project so you can see the full dataset.