Inspiration
Obesity rates all over the world are increasing at an alarming rate. Being obese also increases the risk of other health problems. Due to the pandemic and certain government regulations, it became more difficult to go to the gym, and also there is an increase in the risk of possible exposure if we choose to visit such facilities. The current alternative is to work out at home, but without proper posture and guidance, home workouts are not as effective. Incorrect posture also increases the risk of sustaining injuries.
What it does
Our group decided to create an AI fitness instructor, who can provide real-time correction for squats. Our program aims to inspire people to start working out at home effectively, and safely. Going more in-depth into our project, our program collects real-time video feed from user's webcam. The picture captured is then processed to identify joints and connections between the joints. Our program is able to correctly identify when a user is starting the exercise. It can also judge if the posture is correct by looking at the angle between the thighs and torso, the angle between the thighs and calves and the angle formed by the nose, knees and hip. From these 3 angles, the program can also correctly identify corrections to be made to the posture and notify the user in real-time. Lastly, our program also counts the number of squats repetitions for the user.
How we built it
We use OpenCV to capture and process webcam video feed. Mediapipe is then used to extract landmarks/joints of the user. Our program is implemented with Python code.
Challenges we ran into
Since our group comprises entirely of Y2 university students, we have yet to be exposed to the world of machine learning and artificial intelligence. All the talks hosted by guest speakers were enlightening but most of the time, we were drawing blanks since we are not well versed in these topics. The first challenge arise when we needed to choose our problem statement, we had to consider our area of expertise and at the same time the scope of our project. Many ideas were rejected because it was simply beyond our capabilities. Without any knowledge of artificial intelligence or machine learning, we found it extremely difficult to lay out a concrete plan to follow when implementing our project. Instead, we spent the entire first day and half of the second day exploring different topics in these fields that we thought might be useful for our projects.
Accomplishments that we're proud of
We were able to communicate well together as a team and assisted each other with the new concepts that we were learning. Despite the difficulties in grasping the ideas, we managed to persevere and come up with the product as described. Our final product was relatively similar to what we envisioned, although we did it differently from our initial plan. It is also strict enough and outputs correctly even with numerous tests.
What we learned
We learnt that OpenCV is a very powerful library that can help in many computer vision tasks. Specifically, in our project, we used OpenCV to capture the images from our webcam and utilised Mediapipe to create the body landmarks which helps to detect whether one's body posture is correct when doing exercises.
What's next for PostuRight
We intend to increase the number of exercises available on this platform (planking positions, pushups and sit-ups etc.) and allow for more self-customization of exercise plans (input the exercise and target repetitions). This way, consumers will have the option to follow and correct their exercise forms based on the exercises they want to work on. In addition to these features, we might dive into sports techniques, allowing consumers to learn proper forms in sports such as shooting a basketball and hitting a serve in volleyball. Besides exercises, we hope to expand our project into the work place as well. In the work place, correct postures are of utmost importance, especially when it comes to lifting heavy things, or sitting for long hours in front of our desks. We envision robots utilizing an improved version of our program while patrolling around factories to remind workers to maintain proper postures. Future versions of our program may even be able to identify incorrect sitting posture, and give timely warnings.
Log in or sign up for Devpost to join the conversation.