Inspiration

The idea came to us when one of our members had to stretch due to abdominal pain. Why don't we create an application that could help people with stretching (ie Yoga)? As software developers who sit at a desk all day, stretching and yoga can be beneficial and even act as stress relief by increasing our muscles range of motion and promoting good posture.

What it does

JustYoga provides two key modes: The first option is to cycle through poses manually providing users with a way to practice their favourite yoga poses with their built-in camera. The second option is a yoga circuit that makes the user go through 5 poses of 15 seconds each and records the best score of each. This mode also plays relaxing music in the background as you stretch and pose. Both options utilize real-time pose estimation to analyze user movements and compare them with pre-recorded model poses. A scoring system then calculates similarity percentages between the user's pose and the model pose, providing immediate feedback. There is also an integrated timer system which ensures users maintain poses for the correct duration, ensuring proper form. Finally, the circuit report allows users to view their highest score for each stretch performed helping them assess which poses were well performed and which need more fine tuning.

How we built it

We used Python with OpenCV and MediaPipe as external libraries for the backend, then we connected it to a web app using Flask which was developed using HTML, CSS, and JavaScript. To record the poses (yes, they were physically done by us), we have a separate pose-creating script that would convert poses done by us to JSON. Our pose comparison algorithm processes key body landmarks in real-time, calculating angles and distances between joints to determine pose accuracy.

Challenges we ran into

The most difficult challenge we were running into was to create a humanlike silhouette on the camera overlay, without it being too rough around the edges or too circular. Additionally, developing a precise calculation method for pose similarity required extensive testing and refinement.

Accomplishments that we're proud of

We were very proud of the poseEditor, as we were able to replicate any human shape from built in camera and convert it to a figure. We are also proud of our real-time pose estimation system which achieves high accuracy and provides meaningful feedback that helps users improve their form.

What we learned

We learned how to use and apply OpenCV and MediaPipe. We also learned how to connect the backend with Flask, implement real-time video processing, and develop sophisticated algorithms for pose comparison and scoring. The project enhanced our understanding of computer vision applications in fitness technology.

What's next for Just Yoga

Future enhancements could include personalized difficulty levels, pose recommendations based on user performance, and a mobile application for greater accessibility.

Share this project:

Updates