What it does

This app runs on your laptop and periodically reads in raw electromyographic (EMG) signals from the muscles on your forearm using the Myo Gesture Armband. After collecting enough data, we use machine learning models to predict your current level of stress based on your personal EMG dataset. We detect 3 levels of stress: low, medium, and high.

How we built it

We used the Myo for Processing SDK, which provided a way to build a Processing app that could interface with a Myo connected to a laptop. Using the SDK, we were able to configure our code to record all the incoming data streams related to EMG signals. We were able to use the EMG signals both for record data and visualizing it through the drawing functions that Processing provides. We then used trained machine learning models for classifying the data so that every so often, we system would take up to a minute's worth of EMG data from the person and use it to re-predict what their stress level was. We used stress EMG dataset on physionet to train our models. We ended up having a 10 fold cross validation accuracy of 71% for linear SVM and 98% for kernel SVM (rbf).

Challenges we ran into

We were originally planning to implement this through a mobile application, but the official Myo SDK for Android did not expose the raw EMG data from the Myo. Thankfully, we were able to find that the unofficial Myo for Processing SDK was built to support this feature. Also, had challenges trying to build and train our machine learning models to make sure that we could predict stress as accurately as we could.

What we learned

We learned about how we could record and visualize the EMG data produced from the Myo Gesture Armband, and about which frameworks exposed the Myo data that we needed.

What's next for Myo Stress Detector

We plan to continue training our machine learning models to increase the accuracy of our stress prediction.

Built With

Share this project:
×

Updates