Pushup Pal

Kevin Liu, Aarush Mathad, Nathan Bai

Inspiration

Proper exercise is a cornerstone of personal health, reducing the risk of a litany of health conditions ranging from heart disease to osteoporosis (Harvard Health). In fact, it can even help prevent bone fractures from falls and collisions by strengthening bone density; a team member’s personal recovery process from one such fracture inspired us to create Pushup Pal!

Last semester, he fractured his wrist from a fall while playing badminton. After months of healing, he’s gone through the process of re-adjusting to upper-body exercises from the bottom up. For our team member and many other beginners, push-ups are the quintessential first introduction to strength exercises. And it’s obvious why; you can drop to the floor and perform a set just about anywhere, with a very low barrier to entry.

However, a lack of proper form inhibits muscle growth and creates the potential for severe injuries, such as rotator cuff tears or shoulder impingement. We’ve identified an overwhelming demand from beginners searching for tips, with push-up tutorials on YouTube totaling hundreds of millions of views and a high level of interest demonstrated through search queries (Google Trends). Yet, all of our personal experience tells us that it’s incredibly hard to replicate proper form from only watching a video or reading an article. Motor habits take over, you can’t see certain muscles even with mirrors, and you don’t always know what you’re looking for. Therefore, we’re excited to introduce Pushup Pal: a simple and convenient app specifically targeted for new beginners to help improve their push-up form.

What it does

Pushup Pal helps perfect your form by providing the following:

  • Real-Time Form Grader: Provides an at-a-glance objective metric for users to see the overall form quality using an advanced time-series analysis library. Compares user pushups to well-defined “golden” pushups.
  • Consistency Chart: Maps out score per rep, helping users identify when degradation begins and specific mistake insights.
  • Biomechanic Visualizations: Graphs elbow angle and body alignment for each rep to remedy common starter mistakes (lack of depth, incorrect hip positioning).
  • Personalized Recommendations: AI-powered feedback for each set and personalized score/rep count goals after 5 sets, and updates dynamically as the user progresses.
  • Concise UI/UX: A sleek, no-frills interface to remain accessible for users of any demographic, because our belief is that anyone should feel comfortable exercising.

How we built it

Pushup Pal used the following technologies:

  • Swift: Powers the main form (user interface) and sends the user’s video to the backend for analysis.
  • FastAPI: connects to the backend, allowing for input to be used and outputs to be returned to the frontend.
  • Python 3: Powers the backend, including the FastAPI, models, and vision code.
  • OpenCV & Google MediaPipe (BlazePose): Used for taking in user video and converting inputs into the appropriate format for analysis.
  • Dynamic Time Warping and Heuristic Form Grading: Using both a DTW machine learning and heuristic model, the user’s form is compared to the “golden reps” and scored based on how closely it matches, along with other relevant criteria (like depth and body alignment).
  • Google Gemini 2.5 Flash: Generates feedback based on the user’s most recent set, dynamically provides goals based on information from the user’s past sets.
  • Firebase Firestore: Stores the user’s account information and relevant data about their past sets and goals.

Challenges we ran into

  • Getting the right angle when recording testing videos. The optimal position was found through trial and error, and users are instructed to provide a clear side view based on what we found.
  • Working with the Gemini API to return results and fine-tuning our output. Through meticulous prompt engineering, we were able to specify our desired outputs and obtain them correctly.
  • Fine-tuning the DTW + heuristic model to output reasonable scores based on the quality of our test sets. The model often returned 0 due to complications with geometry and camera angles. We played around with blending the machine learning and heuristics in different proportions until we found the sweet spot.
  • Defining “golden reps” and converting them to a usable format for the analysis (we went with a simple JSON conversion).

Accomplishments that we're proud of

  • Finishing the project!!
  • Building a scoring engine that accounts for both the accuracy of the rep and the quality
  • Gaining accurate insights like rep counts, hip positioning, and elbow angles for each rep.
  • Having an aesthetically pleasing and functional UI.

What we learned

  • Using GenAI in an app is far different than just using a chatbot. To prevent hallucinations and unwanted outputs, we had to be careful with our prompt engineering.
  • Data flow: having never truly worked with an end-to-end data system, this was our first time exploring how to take in data, analyze and store it, and use it to provide a meaningful output.

What's next for Pushup Pal

  • Expanding our library of “golden reps” to include a wider variety of camera angles and settings, improving consistency across users.
  • We hope to incentivize users by adding a social aspect, where users can connect with their friends and place on leaderboards based on consistency and scores!
  • Using AI to scale our goals section into a full workout scheduler based on weeks of data

Built With

Share this project:

Updates