Code Monkey home page Code Monkey logo

on-device-activity-recognition's Introduction

On-device Learning of Activity Recognition Networks

Personalized machine learning on the smartphone

The aim of the project is to provide an end-to-end solution for on-device training, inference and data collection for activity recongition based on TFlite Transfer Learning Pipeline. The corresponding blog post is available here.

Tools Required

  • Python 3.5+
  • Tensorflow 2.0.0rc0
  • Numpy
  • Pillow
  • Scipy
  • Android Studio

Contribute (Future Work)

  • Add support for pairing the app with a smartwatch and fine-tuning the model for a wearable device.
  • Port SoundNet, add functionality for audio recording and tflite model conversion for handling dynamic size input.

If you are interested in contributing to this project, please submit a pull request or reach out at: [email protected].

Dataset

The Heterogeneity Activity Recognition dataset is used for model pretraining. If you use this in your research, please cite their work and check the license.

Citing

If you find this project usefuly, please cite it as:

@misc{saeed2020recognition, 
  author = {Saeed, Aaqib},
  title = {On-device Learning of Activity Recognition Networks},
  year = {2020},
  journal = {aqibsaeed.github.io},
  url = {\url{https://gitHub.com/aqibsaeed/on-device-activity-recognition}}
}

on-device-activity-recognition's People

Contributors

aqibsaeed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

on-device-activity-recognition's Issues

Federated Learning

Dear author,

First of, thanks for your contribution thus far! As a personal project I am currently looking into FL and I would like to use TF Lite for this. As the current TF Federated framework cannot be deployed yet, I think that your work might make a fine start of my project. Now I am wondering if you could give me any pointers to this and if know if e.g. we can simply get the weights that are trained on the device and send them back to the server to then, once more, be used by a Python interpreter?

Thanks!

Not found file "x.npy" and "y.npy"

Dear apibsaeed,

I'm a student and also a beginner in Machine Learning and Deep Learning. I'm studying your project and post about HAR. However, when I clone your project, I cannot find the file "x.npy" and "y.npy". So, how can I get them?

Sincerely.

input_def = next(self._predict_signature.inputs.values().__iter__()): AttributeError: 'list' object has no attribute 'values'

Thank you for your post.

Transfer learning cannot be applied to the model you prepared. This is the error received when using 'tfltransfer' which causes trouble to extract the trained model.

When the model is about to be converted by

converter = TFLiteTransferConverter(num_classes, base, heads.KerasModelHead(head), optimizers.SGD(learning_rate), train_batch_size=batch_size)

, the following error pops up.

File "main.py", line 66, in <module> heads.KerasModelHead(head), File "/converter/tfltransfer/heads/keras_model_head.py", line 52, in __init__ input_def = next(self._predict_signature.inputs.values().__iter__()) AttributeError: 'list' object has no attribute 'values'

I acknowledge that the 'tfltransfer' you used was the older version, and recently there have been some updates on it. I already tried with both versions and still, the error exists. I am not sure what causes the error but I have tried a few different ways to mitigate the issue but have not been successful yet.

Would you please give me some comments on how to convert the model?

I look forward to hearing from you soon.

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.