Code Monkey home page Code Monkey logo

ai_trainer's Introduction

AI_trainer

AI_trainer focuses on counting the number of curls done by an individual.

  • It takes the angle formed by the right hand for calculations.
  • We will use the pose estimation running on the CPU to find the correct points and using these points we will get the desired angles. Then based on these angles we can find many gestures including the number of biceps curls

DEMO

ezgif com-gif-maker (1)

Technologies:

image image

image

METHODOLOGY

- Install and setup

MediaPipe and OpenCV :to gather data about the various joints in our body such as our wrists, shoulders, etc. for making our calculation with angles possible to count our repetitions with heavier weights, NumPy : It will help us with our trigonometry to calculate the angles

- Make Detections

To make the detections possible, we need to recolor our image because OpenCV renders the RGB image to BGR color format but for MediaPipe to work, we need to convert our BGR image back to RGB. Print the detections of our model. Lastly change the color format back to BGR format as OpenCV runs on BGR format, and then we can start rendering our detections.

- Determining Joints

There are 33 landmarks in total, starting from index 0. These represent the different joints within the pose, , if we want to calculate the angle for our Right hand’s bicep curl, we would require the joints of shoulder, elbow and wrist which are 12, 14 and 16 respectively.

image

- Calculating Angles

First we get the coordinates of the threejoints which we require to get the angle calculated. Then we can calculate the slopes of the joints using NumPy. Angles are calculated in radians which then can be converted into degrees.

Reference

ai_trainer's People

Contributors

kedyi avatar

Stargazers

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