GithubHelp home page GithubHelp logo

body_classifier_posenet's Introduction

Gesture Classifier Using Posenet, TensorFlow.js and ml5.js

๐ŸŒˆ Based on Daniel Shiffman's Color Classifier Example. ๐ŸŒˆ ๐Ÿ™ Thanks to Yining for Posenet + KNN Example.:pray:

Trains model based on recorded posenet data in JSON file. (Will upload the recording code soon).

User has two options:

  1. Train model with training data in JSON file, then test based on live input using Posenet.
// to test on live input set testLive on line 18 to true
let testLive = true;
  1. Train model with training data in JSON file, then test the model based on the recorded training data. Bad practice, but we're learning here!
// to test from recorded data set testLive  on line 18 to false
let testLive = false; 

The current poses are:

  1. T pose: Stand with legs together and arms out in a T
  2. Boss pose: Stand with legs together with hands on hips
  3. X pose: Stand with legs wide apart and arms over head and wide apart so you look like an X

I included two recordings:

  1. fullBodyLisa.json I recorded standing far away from camera. Legs are in full view.
  2. closeBodyLisa.json I recorded from about two feet from camera. Legs are not in full view.

Results

It works! It's not so bad considering my data is not so good. Posenet had a lot of trouble catching my arms overhead in pose 3, and you can see that in the training and testing results. I'll test with better data once I have it.

testResults

Issues

  1. I recorded data in my tiny apartment with bad light and it's not very good. Will record better data at ITP with more space. Maybe today!
  2. I'm getting an identifier has already been used error at the top of my sketch.js file. It's not affecting anything, but I would like to figure out where it's coming from. Filed issue here.

What I Want To Do Next

  1. Train from live data. I believe I just need to call model.fit each time a user adds data to live train it. Is this correct?
  2. Add the recording functionality to repo
  3. Record new data.

body_classifier_posenet's People

Contributors

lisajamhoury avatar shiffman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

shiffman n1ckfg

body_classifier_posenet's Issues

Posenet Keywords length.

Hi,

I am currently learning how to use the Posenet library. So, I am thinking if there's a way to get the length of a detected keyword. e.g say when the webcam detects the "rightArm" is it possible to get the length of that right arm?

Live training question

Train from live data. I believe I just need to call model.fit() each time a user adds data to live train it. Is this correct?

The nice thing about using KNN is that the "model" is just the training data itself, there is no additional training step. With the neural network classifier, however, you have to explicitly run fit() after collecting the training data. Ideally you would collect all the data from the user before running fit() you might run into some weird issues running it over and over again for each new data point. But I'd be curious to hear about what happens a variety of different ways!

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.