Code Monkey home page Code Monkey logo

ee292d_project's Introduction

Abstract

Falls represent a considerable medical danger to the world's population. Many fall detection systems have been implemented to rectify this issue, such as the Apple Watch fall detection, Life Alert, and various smartphone IMU applications. However, the models implemented in these devices are either inference-only or cloud-based. Given the diversity of lifestyles and living conditions in the world, a model that can retrain from data it collects on the edge could provide users with a more robust fall prediction system. This report presents an experimental device setup and data collection to test such an adaptive fall detection model on the edge. The device is initially trained on data from the MobiAct dataset and then retrained on the edge using data collected from an LSM330DLC Accelerometer/Gyroscope [1]. Our neural network-based device retrained on the edge achieved an accuracy of 71.0% and 80.0% on two activities we taught our model to label as a non-fall with only 1 and 3 retraining events respectively. We also achieved an accuracy 94.0% on one new activity we taught the model to consider a fall with 4 retraining events.

Scripts in this directory folder

Purpose: train the 1-layer or 3-layer MLP model off-line.

The MLP model is adapted from ttshiz's git repo.

Steps Script Description Input Output
Step#1 preprocess.py
  • Process <MobiAct_Dataset_v2.0> Annotated data into .json fomat.
  • modifications: The accelerator and gyroscpe data is originally recorded in floating point and is casted to int after running this script
  • ss: slice_size in nanoseconds. Determines the time stamp spacing to get new data
  • mobiact_folder: where your MobiAct dataset is stored
  • preprocessed_*.json: preprocessed data (int casted)
Step#2 nn.py
  • Trains the model in K=10 fold. Binary Classification.
  • modification: Script was modified to allow new model training vs. loading a pre-trained model
  • ss: filese: which preprocessed.json file to train and predict
  • load_existing_model:
    • set to 1 if you had previously trained a model and what to use that, e.g. lr_pre_6.0E+09solver_lbfgsiter_1000run_1.pkl
    • set to 0 if you wish to retrain the model or that no model exist yet
  • lr_pre_*.pkl: model
  • bin_results_summary.json: model accuracy, F1score, precision, ....

Scripts in this Micropython folder

Purpose: to set up push button and LED indicator on the Raspberry Pi Pico to communicate with the UpBoard.

Addition set up instructions are descrbied in Micropython/README.md

Scripts in this UpBoard folder

Purpose: to set up on-device inference and training on the UpBoard. Instructions also include how to communicate with the LSM330DLC Accelerometer/Gyroscope module via I2C ports.

Addition set up instructions are descrbied in UpBoard/README.md

Reference on MobiAct dataset

[1] Chatzaki C., Pediaditis M., Vavoulas G., Tsiknakis M. (2017) Human Daily Activity and Fall Recognition Using a Smartphone’s Acceleration Sensor. In: Rocker C., O’Donoghue J., Ziefle M., Helfert M., Molloy W. (eds) Information and Communication Technologies for Ageing Well and e-Health. ICT4AWE 2016. Communications in Computer and Information Science, vol 736, pp 100-118. Springer, Cham, DOI 10.1007/978-3-319-62704-5_7.

[2] Shizume, T., & Salem, W. (n.d.). TTSHIZ/CS539_FALL_PREDICTION. GitHub. Retrieved December 14, 2022, from https://github.com/ttshiz/CS539_Fall_Prediction

ee292d_project's People

Contributors

chris-not-mikey avatar estellekao avatar ttshiz avatar wafaasalem avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.