Giter VIP home page Giter VIP logo

posenet-exercise-data-collection's Introduction

Collect sequential skeletal pose data for exercises

๐ŸŽฌ Collecting data

  1. Open /index.html on a local server or run it through the p5.js Web Editor: https://editor.p5js.org/Nikify/sketches/yXA5qmePw.
  2. Allow access to webcam.
  3. Verify that PoseNet has successfully loaded (success message will be logged in the terminal).
  4. Enter the label/name of an exercise and press Collect data.
    1. Stand in front of the webcam and perpare to perform exercise.
    2. When the initial countdown (5 seconds) has finished, start performing the exercise. PoseNet data is now being collected.
    3. When the second countdown (3 seconds) has finished, data collection stops.
    4. If you wish to collect more exercise data, repeat step 4.1 - 4-3.
  5. Export your data as JSON by pressing Export data.

๐Ÿ”ง Configuring data collection

The time required to collect exercise data can be changed in /sketch.js by modifying the constant collectingTimeMs:

const collectingTimeMs = 3000; //time period for collecting data points (in ms)

The interval with which exercise data is collected can also be changed in /sketch.js by modifying the constant collectingIntervalMs:

const collectingIntervalMs = 200; //interval between collection of data points (in ms)

๐Ÿ“ Converting data from JSON to NumPy

  1. Install Python and NymPy
  2. Run python convert.py {your/path/data.json}
  3. The converted NumPy data is as in /data.npy

๐Ÿšง Todo

  • Add support for labels in NumPy
    • The labels entered during data collection are included in the exported JSON file. However, the JSON to NumPy converter currently ignores labels.

posenet-exercise-data-collection's People

Contributors

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