Skip to content

Kedyi/AI_trainer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages