Summer 2015 Project Report

In this project, we investigated the effectiveness of the Pebble Smartwatch as a tool for collecting accelerometer data for human activity recognition research. Studies on activity recognition typically use accelerometers that are stand-alone devices. If the Pebble can be shown to be effective, then an app for the watch can be created and sold to consumers. The source code for the programs described below can be found by clicking on the “Source Code” tab.

The Pebble accelerometer is 25 Hz. Using the Pebble API, a Pebble app and an Android app was developed for the collection of data. Accelerometer data logged by the watch and the time-stamp are sent to the Android device via Bluetooth in batches. The user selects what activity they will be doing and which body part the Pebble will be attached to during the activity. The options for activities are: sit-ups, push-ups, jumping jacks, walking, jogging, desk work, staying still.

The user needs to press “start” on the Pebble app before pressing “start” on the Android app. The Android app cuts off data with time-stamp prior to the time at which the recording on the Android app began. The Android app is capable of receiving multiple logs of data from the same watch, as well as data from multiple watches logging simultaneously. There is a 10-30 second delay between the end of the logging and when the data shows up on the Android app. However, all the data we collected were less than two minutes long. We haven’t tested how long the apps are able to collect data before malfunctioning.

The data is saved onto the phone in CSV file format. The files are manually transferred to a computer for analysis. We had to manually remove some data at the beginning and end of each files, since they were reflecting the motion of pressing buttons on the watch and phone to start and stop the collection of data and not the motion of the selected physical activity.

The Pebble app.

The Pebble app.

The Android app.

The Android app.

A sample CSV file opened with excel (the graph is not part of the file, it was created for brief visualization)

A sample CSV file opened with excel (the graph is not part of the file, it was created for temporary visualization). Some data at the start and end were removed (not shown).

We wrote a MATLAB script that reads the CSV files, and then uses machine learning generate a classifier, which when given accelerometer data, will try to guess what activity a person was doing based on accelerometer data. A sliding window of width 2.56 seconds with 50 percent overlap between each window is used for data segmentation of training data. The script calculates the mean and standard deviation of each window, and then uses them to train a model. All models we made were done using 5 cross-validation folds. We collected 12 sets of data from two individuals (at least one set of data for each of the seven listed activities) for purpose of training the models.

MATLAB's Classification Learner tool was used to train models.

MATLAB’s Classification Learner tool was used to train models.

The confusion matrix for most of the models were similar.

The confusion matrix for most of the models were similar.

We collected two sets of data from a third individual (sit-ups and jumping jacks). Simple tree, complex tree, fine KNN, and linear SVM, were all able to determine that the individual was performing sit-ups. Regarding the jumping jacks data, the individual paused for a moment during the middle of a set of jumping jacks. Ideally, our model would classify that pause as “staying still”, however all four models failed to do this. However, the pauses the were miss-classified by all our models (see figure below).

Each row is another 2.56 seconds.

Each row is another 2.56 seconds.

Our research has shown that the Pebble Smartwatch is a feasible tool for activity recognition. However, due to the small amount of training data, we can’t make a serious conclusion. Previous research on activity recognition typically placed accelerometers on the waist, ankle, arm, or other parts of the body in addition to the wrist. While the Android app is capable of receiving data from multiple watches at the same time, we did not collect this kind of data to train our models due to time constraints. If it unclear whether a single watch is enough to collect data that will train an accurate model. If someone wants to develop a Pebble app to monitor the activities of the wearer for an entire day, he or she will need to consider whether or not the watch has enough memory to store the data and whether the watch has enough battery power to run the app all day. In addition, if the Pebble API is to be used to make the app, the wearer will need to carry an Android or iOS device at all times in order to save the data.

Leave a Reply

Your email address will not be published. Required fields are marked *