Inspiration

Ahmad spent 5 years suffering from a sports-related injury to his knee. Temporary treatments involved strengthening the knee and staying active in order to alleviate pain and discomfort. However, due to the stay-at-home situation with the Covid-19 Pandemic of 2020/2021, the sedentary lifestyle took both a physical and a mental toll on him, and as our team discovered, it also had similar effects to those around us.

We believe that human body did not evolve to stay in a seated, inactive position for long durations, as our ancestors evolved to hunt and run and chase, etc. To imply that sitting down for hours has no risk on our musculoskeletal structure since we "aren't doing much", is to ignore the millions of years of evolution that got our bodies where they are now.

After visiting a physiotherapist to know more and hopefully treat and cure the ailments Ahmad suffered from, he discovered that the way he stands walks, and most importantly sits all created unnecessary pain and discomfort, adding more inconvenience to the initial trauma of the injury. His physiotherapist prescribed a set of yoga-inspired stretches that functioned to extend the muscles as far as they can comfortably get, hoping that it can enhance flexibility with consistent repetition. That's where the application comes in:

An accessible web app that guides students, remote-workers and anyone stuck at home through sets of motions that allow their bodies to relax and stretch to help avoid injury, reduce fatigue, and improve overall well-being.

What it does

' Stretching to Nirvana' is a smart personal trainer that uses Artificial Intelligence and Machine Learning to help you with your yoga exercises during the lockdown and make them more fun and effective. The project tracks your movements in real-time, which are then fed into a machine learning model that instructs the user whether he or she is doing the movements correctly. The program cycles through a set of Yoga poses (Triangle Pose, Warrior Pose, etc.) and effectively helps you perform these poses, by detecting whether the user is or is not following the provided guideline.

Steps:

  1. The user is presented with a yoga pose for which he must perform for 15 seconds.
  2. The timer counts down once the model detects that the user is performing the pose correctly. If the user breaks out of the pose, the timer count down stops.
  3. The program cycles to the next yoga pose once the 15 seconds have been completed.

How we built it

Stretching to Nirvana leverages the mighty powerful Tensorflow.js Machine Learning framework throughout all steps, with different libraries being used for different steps:

1. Pose-estimation: Pose-estimation or the skeletal tracking that you can see in the interface was implemented using the PoseNet Library. PoseNet conveniently provided us the x-y coordinates of the most prominent joints in the body (elbows, knees, etc.). The coordinates were used to display the skeletal figure you can see on the screen and to track yoga poses made by the user.

2. Yoga Pose Classification: The users' movements were fed into a Classification Machine Learning Neural Network which was implemented using the ml5.js Library. X-Y coordinates of joints provided by PoseNet were analyzed to see if the user is performing the required Yoga pose.

How We Intend to Upgrade

  1. Add more poses
  2. Adding visual cues and suggestions to help correct poses and form whenever the user performs a stretch incorrectly
  3. Adding a socially interactive aspect to the web app where friends and family can choose to do stretches together, in an effort to further help improve the well-being of users.

What we learned and what we are proud of

As two undergrads with little-to-no experience in Javascript, we are proud of the fact that we managed to learn how to use these frameworks in a very short period of time. In addition to the educational experience, we managed to create a socially conscious product that provides value and benefit to users' physical and mental well-being in these difficult times.

Try it out at the link below!

Built With

Share this project:

Updates