{"id":20881931,"url":"https://github.com/aiff22/har","last_synced_at":"2025-05-12T17:30:57.758Z","repository":{"id":94500392,"uuid":"58287226","full_name":"aiff22/HAR","owner":"aiff22","description":null,"archived":false,"fork":false,"pushed_at":"2017-02-23T17:24:06.000Z","size":34879,"stargazers_count":36,"open_issues_count":2,"forks_count":22,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-01T08:44:50.952Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aiff22.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-05-07T22:38:04.000Z","updated_at":"2025-01-13T15:25:39.000Z","dependencies_parsed_at":"2023-03-31T16:05:11.521Z","dependency_job_id":null,"html_url":"https://github.com/aiff22/HAR","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiff22%2FHAR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiff22%2FHAR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiff22%2FHAR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aiff22%2FHAR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aiff22","download_url":"https://codeload.github.com/aiff22/HAR/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253787188,"owners_count":21964293,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-18T07:27:02.561Z","updated_at":"2025-05-12T17:30:56.167Z","avatar_url":"https://github.com/aiff22.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Real-time human activity recognition from accelerometer data using Convolutional Neural Networks\r\n\r\n---\r\n\r\n#### 1. Overview\r\n\r\nThis code implements a Convolutional Neural Network-based approach for real-time human activity recognition.\r\n\r\nThe proposed architecture combines a shallow CNN for unsupervised local feature extraction together with statistical features that encode global characteristics of the time series. Among its main benefits are short recognition intervals of size up to 1 second, almost no manual feature engineering or data preprocessing, and a domain-independent architecture that with a minimal amount of modifications can be applied to different types of datasets.\r\n\r\n---\r\n\r\n#### 2. Dependencies\r\n\r\n###### Data segmentation:\r\n\r\n- matlab or octave\r\n\r\n###### Activity classification\r\n\r\n- python 2.7+\r\n- scikit-learn\r\n- numpy\r\n- tesnorflow\r\n\r\n---\r\n\r\n#### 3. Experiments\r\n\r\nThe system was evaluated on two commonly used [WISDM] and [UCI] datasets that contain labeled accelerometer data from \r\n36 and 30 users respectively and can be freely downloaded from the corresponding websites.\r\n\r\n##### Data Segmentation\r\n\r\nTo perform a segmentation of the initial time series and generate datasets for testing the model, unzip file  \r\n\"data_processing/datasets.zip\"  and run matlab scripts  \"run_WISDM.m\"  or \"run_UCI.m\" for WISDM and UCI \r\ndatasets respectively. The parameters of segmentation are specified in the header of these scripts.\r\n\r\n##### Baseline HAR techniques\r\n\r\n- To test an approach based on Random Forest + hand-crafted features run \"wisdm_random_forest.py\".\r\n- To test an approach based on Random Forest + PCA features set parameter 'use_pca_features' to true in \"run_WISDM.m\" \r\nand after the data is generated run \"wisdm_random_forest.py\".\r\n- To test an approach based on the classification of raw accelerometer time series using K-nearest neighbor algorithm, \r\nrun \"wisdm_knn.py\".\r\n\r\n\r\n##### CNN Model\r\n\r\nThe proposed CNN-based model is implemented using ***tensorflow*** machine learning library.\r\n\r\nTo apply CNN to WISDM dataset, generate traing data and run \"cnn_wisdm.py\". For UCI dataset run \"cnn_uci.py\". \r\nThe parameters of the CNN are specified in the header of these scripts.\r\n\r\n---\r\n\r\n#### 4. System performance\r\n\r\n\r\nWhen using UCI dataset and segments (recognition intervals) of size 128, CNN should achieve the accuracy score of about 97%.\r\nFor segments of size 50 this value should be about 94%.\r\n\r\nWhen using WISDM dataset and segments (recognition intervals) of size 200, CNN should achieve the accuracy score of about 93%.\r\nFor segments of size 50 this value should be about 90%.\r\n\r\n\r\n [WISDM]: \u003chttp://www.cis.fordham.edu/wisdm/dataset.php\u003e\r\n [UCI]: \u003chttps://archive.ics.uci.edu/ml/machine-learning-databases/00240\u003e\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faiff22%2Fhar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faiff22%2Fhar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faiff22%2Fhar/lists"}