Inspiration
During the pandemic, our team struggled to find ways to stay fit with all the closed gyms and fitness centers. Similarly, with many of our friends, physical fitness was a big concern amongst many of us. After all, a healthy body is a healthy mind. Although gyms are closed, pushups and other non-equipment-dependent exercises are available. But while we would try these workouts it was hard to check our posture to ensure we were doing it right.
What it does
Trainer uses Tensorflow posenet detection to estimate your pose and tell you if the exercise you are doing is correct. In our demo, we model how trAIner ensures that your squats fit the technique of fitness models to ensure you’re working out properly as well as take factors such as height into consideration to calculate the calories that you are burning from the exercise. We also added a fun little competitive aspect to our app with a leaderboard to motivate our app’s users to stay fit.
How we built it
Our app uses a Python Flask backend, with API endpoints to handle user and data storage, with JWT token-based authentication. We used the Tensorflow Posenet model to do pose estimation. Our mobile app is made using React Native and built using Expo. The pose classification is done using a KNN classifier.
Challenges we ran into
We had a lot of trouble, in the beginning, getting everything working with Posenet. There were a lot of dependency and logic errors with our code. Moreover, training the KNN model took a lot of trial and error. In addition, communication between team members was hindered by our 3 hour time difference.
Accomplishments that we're proud of
We’re proud of our ability to learn machine learning and apply it towards pose detection through our KNN model. We also were able to overcome our confusion by implementing our UI/UX development and connect it using react routers to our backend app. In addition, we also were able to train many different poses in an effective manner.
What we learned
We learned how to use things like Tensorflow JS and Posenet. It was also the first project that any of our teammates did with React Native. The first thing we learned was that react native, across ios and android, acted differently with the stylesheets, so being able to configure that properly so that it doesn't have too much of a UI difference. Second thing was how to work with numerous View tags to avoid clutter but also be able to connect components together while keeping organization throughout code. Moving on, it’s important to keep commit messages as simple as possible and commit ever so often since many errors arose that were very hard and difficult to fix and would’ve been made easier had that initial step been taken. In terms of the Posenet, we learned how to have javascript components interact with typescript along with how to configure the camera within the phone to our benefit and use it specifically to draw nodes over the person for tracking purposes.
What's next for TRAINER
We were ready to implement more gamified features that would encourage the user to exercise more frequently. Our backend actually supports a leaderboard system, and we had plans to use it in our frontend, but the time limit rendered that dream impossible. Exercise streaks can also be implemented quickly. Along with this, we plan on making more changes to the UI along with additional workout routines and personal virtual trainers along with a tracking database for what you place inside your body through using nutrition and food API’s
Built With
- javascript
- python
- react-native
- tensorflow



Log in or sign up for Devpost to join the conversation.