Inspiration

The Gymnastics At-Home Form Trainer is a pose detection model that evaluates the correctness of a gymnastics exercise. It can be used on a computer or a Raspberry Pi camera, it is easy to use, and can be brought anywhere. Computer vision tools such as OpenCV and MediaPipe provide real-time feedback to the user. It detects landmarks on the user’s body and calculates angles on certain limbs for certain exercises. This way, the user can have an evaluation system for the form of their exercise, leading to correct and efficient workouts. This tool aims to provide an easier alternative to gymnastics coaching when they are training from home or outside the gym.

What it does

The user can run the code, which will open a new window with visual landmarks on their bodies. Then, while the user does the exercise, the model will detect the angle between limbs and evaluate the correct form. By giving real-time feedback on the window (printing messages), the user can further correct the form and shape of the exercise.

How we built it

Using OpenCV and MediaPipe, I was able to create an AI-powered pose detection system that detected the user's motion in real-time. It draws landmarks on the body of the user, which helps calculate the angle between limbs for correction.

Challenges we ran into

The code was running very slowly at first, and the frames were lagging behind what should have been a lot faster. I couldn't figure out why the code was doing this, and the motions it detected showed up on the window seconds later than they should have. After looking carefully at the code, I noticed that one of the functions I input was inside the while loop instead of before it, which was creating the function each time the loop ran.

Accomplishments that we're proud of

I am proud of learning the code needed for this system, and also being able to apply the code to different types of exercises.

What we learned

I learned how to use the OpenCV library, as well as numpy, MediaPipe, and math. Using these different libraries, I learned the syntax for each one and how to use each one with the others. I also learned that the errors that occurred inside the code can be easily fixed if you look closely, while understanding each line of the code.

What's next for Gymnastics At-Home Form Trainer

The future steps for the Gymnastics At-Home Form Trainer are to implement new exercises into the system, like splits, kicks, and other movements. Additionally, the trainer will be able to detect more complex movements like flips and skills instead of just conditioning movements. Lastly, I would like to include a UI for the user for easier navigation of the system.

Built With

Share this project:

Updates

Submission history