Human Activity Recognition Using Smartphone Sensor Data ECE 539 Final Project Marc Petit 12/13/2017 ECE 539 Final Project
Objective Activity tracker for cellphone applications Dataset from UCI Machine Learning Repository 30 volunteers (19 – 48 years old) Samsung Galaxy SII (accelerometer and gyroscope, 50 Hz sampling rate) 61 experiments (~20 activities each) 1214 samples Activities where extracted using video data Using 128 reading window (2.56 sec), a 561 feature vector was created (for each activity) (X,Y,Z) – Acceleration (Accelerometer) (X,Y,Z) – Angular Velocity (Gyroscope) Walking, Walking Upstairs, Walking Downstairs, Sitting, Standing, Laying + Transitions 12/13/2017 ECE 539 Final Project
Approach Use given feature vector and various classifier Use CNN to get features from raw data Three Way Cross-Valid. (Prob. Of Misclass./False Alarm) Software: MATLAB (NN Toolbox, Stat. and ML Toolbox) 561 Features (X,Y,Z) Mean (X,Y,Z) Std (X,Y,Z) Max (X,Y,Z) Energy (X,Y,Z) max Freq (X,Y,Z) AR Coef. …. Classifier Linear Discr. KNN SVM 11/14/2018 ECE 539 Final Project
Sensor Data Example Raw Data Feature Space (using t-Dist. Stochastic Neighbor Embedding) Walking Walking Upstairs Walking Downstairs Sitting Standing Laying Stand to Sit Sit to Stand Sit to Lie Lie to Sit Stand to Lie Lie to Stand 12/13/2017 ECE 539 Final Project
Classification Prob. of Misclassification Prob. of False Alarm Explain: Classfier Column, Activity column For Linear Discriminant the prob. Of Misclassfication 0.05% and of False Arlam is 0.4% At the bottom is the average, the average also includes the transition classification which I omitted here Green means good, red means bad You can see that in the classifier column the linear SVMs are doing pretty well In particular walking downstairs and laying is easy to detect and sitting and standing is harder to detect Sitting has the highest prob of misclassification and also the highest prob. Of false alarm *) incl. transitions Prob. of Misclassification Prob. of False Alarm 12/13/2017 ECE 539 Final Project
CNN for Raw Data Classification CNN Structure [Ming Zeng, 2014] Optimization using MATLAB Genetic Algorithm Function Window Size (200), Conv. Size(23), #Filter (97), Pool Size (46) Evaluation and Comparison Image Input Layer Window Size x 2 x 3 Convolution 2D Layer Conv. Size #Filter Max Pooling 2D Layer Pool Size Softmax + Classification Layer Fully Connected NN Prob. of Misclassification Prob. of False Alarm 12/13/2017 ECE 539 Final Project
Discussion Classifiers are more reliable than the CNN (Linear/ 2nd Order) SVM seem to work best for this problem (consistent with literature) CNN does feature extraction automatically but needs more training data. Classifiers and CNN were particularly good at identifying walking or laying, while sitting and standing was hard to distinguish. 12/13/2017 ECE 539 Final Project