Politecnico di Torino (logo)

Human Activty Recognition in Apple developing environment

Fabiano Finocchio

Human Activty Recognition in Apple developing environment.

Rel. Giuseppe Carlo Calafiore. Politecnico di Torino, Corso di laurea magistrale in Ingegneria Biomedica, 2019

PDF (Tesi_di_laurea) - Tesi
Licenza: Creative Commons Attribution Non-commercial No Derivatives.

Download (2MB) | Preview
[img] Archive (ZIP) (Documenti_allegati) - Other
Licenza: Creative Commons Attribution Non-commercial No Derivatives.

Download (1MB)

This master thesis work is about the Human Activity Recognition field, which is a part of the Body Area Network. The main purpose of this thesis work is to be able to collect and analyze signals and parameters useful for recognizing human activities performed by users. To do this, MotionDataLogging, a WatchKit App was developed using an Apple Watch Series 2 combined with an iPhone 6; this app allows, by pressing a button, to collect accelerometer data (already deprived of the gravitational component), gyroscope, orientation of the device through the three Euler angles, at a fixed frequency of 50 Hz. The app also allows, through the authorizations provided by the user, to collect data relating to the user’s current speed through the device’s GPS and the user’s heartbeat obtained from the HealthKit package present in the iOS system. This data thus obtained are recorded through JSON format files and stored within the user’s iPhone within the iOS file system app. Data was collected on 2 male subjects in environments and uncontrolled modes, choosing a total of 8 activities such as: walking, running, indoor cycling, outdoor cycling, driving, elliptical and rowing machine, smoking. Data is then transferred and processed on an external server and processed using Python v.2.7 and his data wrangling, visualization and machine learning packages such as Pandas, Scikit and Matplotlib. In the processing phase, data sequences have been divided into windows of 5 seconds each, associating for each window the related heart rate and speed values (which are not possible to sample in a fixed way) through the relative timestamp obtained during the recording phase. Subsequently, features in the time and frequency domain were extracted from the windows, so as to obtain a dataset composed of 1054 instances, each containing 214 features. By applying a filter feature selection, in which highly correlated and low vari- ance feature are removed from the aforementioned dataset, the number of features is reduced to 21. It was also explored in this work HAR excluding heart rate and current speed: in that case, the features considered were 18. Having thus obtained the definitive dataset and split into training and test set, some supervised model were tuned and crossvalidated with stratified k-fold, with k=5. Model selected were : K Nearest Neighbor, Support Vector Machine, Decision Tree and Random Forest. The tuned model were also employed to perform HAR on the test set and the performance of the different classifiers were compared, with the best accuracy (98%) obtained by Random Forest. The result obtained suggest the use of Apple Watch as a quality-recording device, with high recognition rate even employing very simple classifying models.

Relators: Giuseppe Carlo Calafiore
Academic year: 2019/20
Publication type: Electronic
Number of Pages: 94
Corso di laurea: Corso di laurea magistrale in Ingegneria Biomedica
Classe di laurea: New organization > Master science > LM-21 - BIOMEDICAL ENGINEERING
Aziende collaboratrici: UNSPECIFIED
URI: http://webthesis.biblio.polito.it/id/eprint/12905
Modify record (reserved for operators) Modify record (reserved for operators)