Coder Social home page Coder Social logo

anadyanair / ml5-posenet-image-classification Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 1.31 MB

This repository provides a simple example of performing image classification using ML5.js and PoseNet.

License: GNU General Public License v3.0

HTML 0.01% JavaScript 99.99% CSS 0.01%
javascript machine-learning ml5js p5js posenet

ml5-posenet-image-classification's Introduction

ML5.js Image Classification through PoseNet

This repository provides a simple example of performing image classification using ML5.js and PoseNet. ML5.js is a JavaScript library that makes machine learning accessible for creative coding, and PoseNet is a pre-trained deep learning model that estimates human pose from images or videos.

In this example, we'll be using PoseNet to capture the pose of a person and then use that pose information for image classification. The code uses a pre-trained PoseNet model and a custom image classification model to demonstrate the integration of the two.

Getting Started

Follow these steps to get started with using ML5.js and PoseNet for image classification:

  1. Clone this repository to your local machine:

    git clone https://github.com/AnadyaNair/ML5-Posenet-Image-Classification.git
  2. Navigate to the project directory:

    cd ML5-Posenet-Image-Classification
  3. Open the index.html file in a web browser to see the example in action.

How It Works

  1. Loading PoseNet Model: The example loads the PoseNet model using the ML5.js library. This model is responsible for estimating the pose of a person in the video feed.

  2. Capturing Pose Data: As the video feed starts, PoseNet estimates the pose of the person. The relevant pose data, such as the positions of various body keypoints (e.g., wrists, elbows, knees), is extracted from the PoseNet model.

  3. Image Classification: The extracted pose data is then used as input to a custom image classification model. This model classifies the current pose into a specific category. In this example, the image classification model could identify yoga poses or dance moves based on the detected body keypoints.

  4. Displaying Results: The classification result is displayed on the webpage, showing the detected pose and the corresponding classification label.

Customization

Feel free to customize and expand upon this example:

  • Image Classification Model: Replace the custom image classification model with your own pre-trained model or use a different ML5.js-supported model for your desired classification task.

  • Classification Categories: Modify the categories or labels used for classification according to your application.

  • Styling: Enhance the styling of the webpage to create a visually appealing interface for users.

Dependencies

  • ML5.js: A friendly JavaScript library for machine learning.

Resources

Contributing

Contributions are welcome! If you have ideas for improvements, bug fixes, or new features, please feel free to submit a pull request.

License

This project is licensed under the GNU GENERAL PUBLIC LICENSE v3.0.

ml5-posenet-image-classification's People

Contributors

anadyanair avatar

Stargazers

 avatar

Watchers

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