Skip to content

Vicky1-bot/MediaPipePose-Estimation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

MediaPipePose-Estimation

Overview

One of the applications BlazePose can enable is fitness. More specifically - pose classification and repetition counting. In this section we’ll provide basic guidance on building a custom pose classifier with the help of Colabs and wrap it in a simple fitness demo within ML Kit quickstart app. Push-ups and squats are used for demonstration purposes as the most common exercises.

gg

Fig 1. Pose classification and repetition counting with MediaPipe Pose.

the k-nearest neighbors algorithm (k-NN) as the classifier. It’s simple and easy to start with. The algorithm determines the object’s class based on the closest samples in the training set.

Classification

The k-NN algorithm used for pose classification requires a feature vector representation of each sample and a metric to compute the distance between two such vectors to find the nearest pose samples to a target one.

To convert pose landmarks to a feature vector, we use pairwise distances between predefined lists of pose joints, such as distances between wrist and shoulder, ankle and hip, and two wrists. Since the algorithm relies on distances, all poses are normalized to have the same torso size and vertical torso orientation before the conversion.

g1

Repetition Counting

To count the repetitions, the algorithm monitors the probability of a target pose class. Let’s take push-ups with its “up” and “down” terminal states:

When the probability of the “down” pose class passes a certain threshold for the first time, the algorithm marks that the “down” pose class is entered. Once the probability drops below the threshold, the algorithm marks that the “down” pose class has been exited and increases the counter.

References

https://google.github.io/mediapipe/solutions/solutions.html

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published