GithubHelp home page GithubHelp logo

sandy4321 / human-activity-recognition-using-recurrent-neural-nets-rnn-lstm-and-tensorflow-on-smartphones Goto Github PK

View Code? Open in Web Editor NEW

This project forked from girishp92/human-activity-recognition-using-recurrent-neural-nets-rnn-lstm-and-tensorflow-on-smartphones

0.0 1.0 0.0 142.43 MB

This was my Master's project where i was involved using a dataset from Wireless Sensor Data Mining Lab (WISDM) to build a machine learning model to predict basic human activities using a smartphone accelerometer, Using Tensorflow framework, recurrent neural nets and multiple stacks of Long-short-term memory units(LSTM) for building a deep network. After the model was trained, it was saved and exported to an android application and the predictions were made using the model and the interface to speak out the results using text-to-speech API.

Python 100.00%

human-activity-recognition-using-recurrent-neural-nets-rnn-lstm-and-tensorflow-on-smartphones's Introduction

Human activity recognition using Recurrent Neural Nets(RNN), LSTM and Tensorflow on Smartphones

This was my Master's project where i was involved using a dataset from Wireless Sensor Data Mining Lab (WISDM) to build a machine learning model for end-to-end systems to predict basic human activities using a smartphone accelerometer, Using Tensorflow framework, recurrent neural nets and multiple stacks of Long-short-term memory units(LSTM) for building a deep network with hidden units. After the model was trained, it was saved and exported to an android application and the predictions were made using the model as a proof of concept and the UI interface to speak out the results using text-to-speech API.

Process:

  1. Clean and combine the data
  2. Do data pre-processing by taking fixed-length sequences(200) of each sequence activity as training data as per the model requirements for maximizing the efficiency of the model.
  3. Split the data into training(80%) and test(20%) sets.
  4. Build a deep network by stacking multiple layers of LSTM memory units(This will solve the vanishing gradient problem) with 2 fully connected RNN.
  5. Build the whole model using the Tensorflow framework and create the placeholders for the model to access at the end-to-end system.
  6. Create a loss function for minimizing the loss, we use Least Squared Error(LSE) or L2-norm as it will provide a stable solution with a single solution.
  7. Set an optimizer for the model with a single learning rate throughout the training period. Here we have used stochastic gradient descent or AdamOptimizer from the Tensorflow API.
  8. We train the model for 50 Epochs and with the batch size as 1024(32 x 32) i.e 64 hidden units. We got the accuracy above 97% on test sets.
  9. Now we save the computation graph with weights, history, predictions and create a checkpoint folder.
  10. Next we freeze the Tensorflow graph and save it in a single protobuf file.
  11. Export the file to an android application using android studio and build a simple test application for doing predictions on a smartphone using its accelerometer sensor as inputs to the model.

human-activity-recognition-using-recurrent-neural-nets-rnn-lstm-and-tensorflow-on-smartphones's People

Contributors

girishp92 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.