Skip to content
PetalEdgeDocs

Introduction

Motion projects

Teach a small device to recognise gestures and movements from an accelerometer and gyroscope.

On this page

What is a Motion project?

A Motion project learns from sensor recordings: the numbers an accelerometer or gyroscope measures many times per second while something moves. After training, the model watches new sensor data and tells you which movement is happening. For example:

  • a "wave", "circle" or "idle" gesture with a wrist band,
  • walking, running or standing still,
  • a machine running normally or shaking.

In Studio, choose Motion: Gesture Recognition with the Sensor device input when you create the project.

What motion data looks like

A recording is a table. Each row is one moment in time, and each column is one sensor axis:

Time (ms)accXaccYaccZ
00.129.710.40
100.359.520.61
200.889.100.94

Here a new row arrives every 10 ms, so the frequency is 100 Hz (100 rows per second).

What you will do

  1. 1Collect recordingsUpload CSV files or record from a device
  2. 2LabelOne label per recording
  3. 3Cut into windowsShort pieces, e.g. 1 second
  4. 4Extract featuresRaw Data, Spectral Analysis or Flatten
  5. 5TrainA small neural network
  6. 6Evaluate & deployTest live, then run on a device
The Motion workflow in Studio

The Motion workflow page walks through every step in Studio.

Before you start

  • Record each movement many times (at least 10 to 20 recordings per label is a good start).
  • Ask different people to do the movements, if you can.
  • Add an idle label for "no gesture", so the model learns what doing nothing looks like.