Skip to content

mansikataria/SquatDetection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

I have used MediaPipe to detect key points for human body joints, which in turn allows us to detect squat pose.

Here is the Google Colab Notebook

angle logic

Used 4 different angles to detect the squat:

  1. Elbow joint (A), Shoulder joint(B), Hip joint(C) and Knee joint(D).

  2. Apply the three points method to calculate the angle between two lines.

  3. See if the value for the angle between Hip join (C) and Knee joint (D) is less than 130 degrees.

  4. To determine the correct hand position for squat I’ve set the value of the Elbow joint (A) to greater than 130 degrees, and the value of the Shoulder joint(B) to greater than 30 degrees and less than 120 degrees.

  5. The mean square error is used to train the model.

Some sample outputs:

image image