Wearables

Entertainment

Gym activity recognition on wearable devices

Activity recognition and classification on a sensor.

Gym activity recognition on wearable devices
Contact us Fork on GitHub

Wearables

Entertainment

Unico-GUI

Human activity

Gyroscope

Contact us Fork on GitHub
Artificial intelligence revolutionizes the precision of human activity recognition, and edge AI enables these algorithms to be embedded everywhere. They can run locally without disclosing any personal information and are embedded in devices such as smartwatches and wristbands.

If you are developing such an application and are concerned about power consumption, this use case is for you. The gym activity recognition use case serves as a fitness example for wearable devices, recognizing activities like bicep curls, lateral raises and squats - all with very low power consumption, thanks to the Machine Learning Core (MLC) available in ST MEMS sensors.

Approach

  • Data logs can be acquired through Unico-GUI or MEMS Studio if the Profi-MEMS board (STEVAL-MKI109V3) and the LSM6DSV16X DIL24 adapter board (STEVAL-MKI227KA) are used.
  • Data logs can also be acquired using the SensorTile.box PRO wireless box kit and the STBLESensor app on Android or iOS.
  • A low-pass filter (IIR1) has been applied to the accelerometer input data.
  • We used Unico-GUI to generate and configure a decision tree model with four features: mean, peak-to-peak, min, max.
  • The MLC runs at 30 Hz, computing features on windows of 90 samples (corresponding to 3 seconds).

Sensor

6-axis inertial measurement unit (IMU) and AI sensor with embedded sensor fusion, Qvar for high-end applications (reference: LSM6DSV16X).

Data

The accelerometer is configured with 8 g full scale, 30 Hz output data rate, low-power mode 1.
The sensor orientation for this algorithm is east-north-up (ENU):
  • X parallel to the arm (directed towards the hand for left wrist, directed away from the hand for right wrist)
  • Y perpendicular to the arm (directed away from the user when looking at the device)
  • Z pointing up

To implement this algorithm with a decision tree, all the data logs have been acquired using the device (LSM6DSV16X) mounted on a wristband on the left hand (or right hand).

Results

Power consumption (sensor + algorithm): 16.5 uA

The decision tree has around 30 nodes and it is configured to detect the different classes.
The output of the decision tree classifier is stored in the register MLC1_SRC (70h):
  • 0 = No activity
  • 4 = Bicep curls
  • 8 = Lateral raises
  • 12 = Squats

The configuration generates an interrupt (pulsed and active high) on the INT1 pin every time the register MLC1_SRC (70h) is updated with a new value.
The duration of the interrupt pulse is 33.3 ms in this configuration.

Model created with

Unico-GUI

Model created with

Compatible with

LSM6DSV16X

Compatible with

Resources

Model created with Unico-GUI

A comprehensive software package that allows quick and easy setup of the sensors, as well as the complete configuration of all the registers and advanced features (such as the Machine Learning Core, Finite State Machine, pedometer, etc.) embedded in the digital output devices.

Model created with Unico-GUI

Compatible with LSM6DSV16X

Smart sensors capable of directly processing the data they capture and delivering meaningful insights to the host device. By processing data locally, smart sensors reduce transmitted data and cloud processing requirements, thus lowering power consumption at the system level.

Compatible with LSM6DSV16X

You also might be interested by

Wearables | Entertainment

Yoga pose recognition on wearable devices

Pose recognition and classification on a sensor.

Entertainment

Run a Rock-Paper-Scissors game on Arduino using NanoEdge AI Studio 

Gestures classification on Arduino using a ToF sensor.

Wearables | Entertainment

Human activity recognition using a smartphone

Using a smartphone to recognize human activities.