Fitness Pal is an AI based web app that allows users to evaluate and improve their form. Users can input video through live video, or if preferred, upload a video. Our model is made based on the latest technology available, and will ensure that all aspects of your exercise are evaluated. Once you are done inputting your video, our AI generated results will give you a grade as well as some tips you could follow to improve your form. We also videos resources to improve your form for the given exercise.
I created this as a hackathon project and won Apprentice Hack at Abracadabra Hacks 2 as well as Grand Winner at Fremont Hacks.
Requirements
- Latest version of Google Chrome, Edge, or Firefox
- Latest version of Python installed
- Use pip to install mediapipe, flask, and opencv
- pip is automatically installed on your PC as part of your Python installation. Simply type this into your terminal
python3 -m pip install [LIRBARY TO INSTALL]
About
Our inspiration comes from the thousands of people that develop injuries in the gym from poor form. This issue hits close to home because I have seen my close friend injure himself really severely due to bad form. After seeing him get injured I thought to myself “how can I prevent this”.
Later on, we did more research on this topic and realized this issue is much more common than we thought. According to the national library of medicine, “35% of people who do weights with incorrect form develop a serious injury”. After reading about this, we wanted to make sure no one gets injured from using bad form again
Thus we developed Fitness Pall, an AI-based program explicitly designed to prevent injury by helping new gym members with their form.
What it does
Fitness Pal is a cutting-edge web tool that helps new gym members avoid injuries by identifying improper form in the weight room.
Fitness Pal utilizes a two-step detector-tracker ML pipeline to identify major signs of bad form and displays all this information in a user-friendly interface. Along with correcting your form, Fitness Pal provides users with custom tips on what they are doing wrong and how to fix it. Fitness Pal also provides an Example Video on how to do the exercise correctly. In addition, users receive an overall grade on how their form was in this exercise . With this tool, presenters can now focus on having the best form they can while preventing injury.
To train our model so that it could distinguish between proper and improper gym form with accuracy, we collected data from hundreds of hours of gym data. To be sure we could cater to the specific demands of our visitors, we used data from studies, presentations, and some governmental websites. Additionally, in order to offer thorough instructions on how to correct poor form so that our users may easily avoid injury, we gathered information from other gym websites.
How we built it
We divided our tasks into two main groups after about an hour of planning and brainstorming. Nilay focused mostly on the project's user interface and design, while Manit worked primarily on the machine learning model and backend.
Python is the best language to utilize because of its applications in machine learning, which is why we choose it as our language of choice. Fitness Pal uses Flask because it is the lightweight backend web development library that has become synonymous with Python. This implies that when using Fitness Pal, our users get a quick and simple experience. In order to make it simpler for our model to recognize bad form and prevent harm, we also utilized OpenCV to grayscale and resize the video data.
Additionally, to train our model and get it precise enough to meet our standards, we employed the MediaPipe Python package. With the aid of MediaPipe, our model is able to precisely locate and recognize crucial human body landmarks that can later be utilized to spot indications of bad shape.
Challenges we ran into
We ran into many problems while trying to incorporate flask in our program. Both of us have never used flask before so we had to spend countless hours to try and learn every part of flask. We also had trouble adding a live video feature to our program and that took some time to overcome.
Accomplishments that we're proud of
We are really proud of ourselves for being able to design a project that would have the potential to significantly alter the lives of numerous individuals all over the world while still remaining distinctive. We are astounded at how much we were able to complete in such a short period of time and how well the final product came together.
What we learned
Throughout the course of this project, our team gained a great deal of knowledge regarding web development and machine learning. We gained knowledge of libraries like OpenCV and MediaPipe and found some intriguing brand-new features in libraries like Flask that we already used. We discovered how to employ computer vision to address problems in our neighborhood and how to incorporate our fixes into engaging applications.
What's next for Fitness Pal
In the future for Fitness Pal, we plan on adding many more exercises that can be scanned for bad posture. We also hope to develop a Mobile App so that you can submit a video of yourself at the gym or on the go.