Inspiration

The motivation for this came project came from the quarantine and lockdowns. During these long months of lockdown, it's difficult for people to go out to exercise, run, and do things they can to stay fit. Yoga is something that can be done indoors easily and has a lot of benefits. But it can be tricky to get any yoga pose correctly if a person doesn't do yoga regularly. With the help of yoga pose detection, people can not only classify the pose but also check how well is their posture as compared to a perfect yoga pose.

What it does

For now, Yoga Pose Detector can accept any image from the user and classify it into one of the 10 predefined yoga poses. The predicted label is a string telling the yoga pose the person is trying to perform. The input is a picture in any format and the output is the predicted label.

How we built it

Libraries used

  • Keras- This is the main library used in this project. The model is entirely built on Keras including all the image augmentation, transfer learning, training, testing.

  • NumPy- Used for pixels manipulation

  • Matplotlib- To plot images and loss plots.

  • Flask- Used for deploying our classification model

Network Architecture

The motivation of using transfer learning for our task came after we implemented a Deep Neural Network from Scratch. The model build from scratch gives accuracy only around 18%-20%. We can boost the accuracy with the help of transfer learning.

Keras application module has a variety of pretrained networks that can be easily downloaded.

In our project, we tried multiple networks before settling to MobileNet.

Challenges we ran into

Deploying the machine learning model is a big challenge. We tried BentoML and Flask for the deployment and it caused a lot of issues.

Accomplishments that we are proud of

Our model classifies unseen images with an accuracy of 60%. That is great to achieve with a small dataset and few epochs.

What's next for Yoga Pose Detector

  1. Adding real-time prediction feature, so that person can perform yoga in front of the webcam and yoga pose detector can classify the pose in real-time

  2. Adding scoring features to tell how well your yoga posture is Comparing the perfect pose with the user's pose will help the user to improve by correcting their posture

  3. Adding Style Transfer. The person will be able to add stylish backgrounds to their image.

Built With

Share this project:

Updates