Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pushup Tracker with Form Checking Metrics

Project Overview

This project features a pushup tracker that not only counts the amount of reps performed, but also coaches you in real-time with pointers on the form of the rep.

Form Tracker in Action alt: Real-time form feedback displayed during push-ups using pose landmarks

Live Demo: Video Demo

How It's Made

Tech Stack:

  • Python
  • OpenCV for video capture & visualization
  • MediaPipe for real-time pose tracking
  • Numpy & Math for calculations and geometry

Unique Features

Compared to generic static pushup rep trackers, I implemented the following ->

  • Posture Awareness
    Rather than just saying "rep completed," this script checks if the back is straight using a vector-based slouch angle, adding serious value for anyone working on form correction.

  • Form-Based Orientation Logic
    One of the challenges with real-time pose detection is accounting for camera angle and body orientation. Our system doesn’t just look at limb angles in isolation — it anchors calculations around the torso's orientation. By deriving vectors from the hips, shoulders, and nose, the system estimates whether the user is facing the camera, angled slightly downward, or slouching into the rep. This helps avoid false negatives, especially when someone is doing push-ups with their head slightly dipped — which would normally confuse simpler landmark-based systems.

  • Rep Validation with Intelligent Thresholding
    This project doesn't just count reps when elbows bend — it verifies that full extension and adequate depth are achieved in sequence. This removes half-reps or bounce-style cheating. Plus, the system is tuned to avoid double-counting due to momentary pose flicker.

  • Landmark Centering for Precision
    Rather than using individual points like left or right shoulder alone, this project calculates the center point between both shoulders and both hips. This gives a better approximation of spine alignment and helps neutralize asymmetry — critical for users whose form naturally skews slightly.

Project Inspiration and Lessons Learned

Stemming from my passion for working out, I developed this project to help others with their fitness journeys. I often struggled performing exercises with the respective correct form, leading to stalled progress or even injuries. This project opened my eyes to the integration of Computer Vision with Exercise, and inspired me to explore how technology can make fitness safer and more effective.

This project was the first time I had used Mediapipe for pose estimation. Although executing my vision seemed impossible at first, all it took was a bit of intuition. My biggest takeaways were the following:

  • Angles depend on consistent landmark orientation, and small shifts in camera perspective can change the math drastically. I had to define posture in relative vectors, not absolute positions. This approach will be heavily relied upon in future projects. As I go deeper into tech, I realize that data is very noisy, and I can't expect static,filtered, and pretty numbers everywhere.

  • Simple vector math (like dot products) goes a long way in understanding 3D-like behavior from 2D projections. With a bit of intuition and enough time to actually understand concepts, building this project became much more manageable.

Future Iterations

  • Multi-exercise Implementations: Squats, planks, and deadlifts are on the roadmap.
  • ML-based form scoring: Future versions may learn from labeled “good” vs “bad” reps to improve scoring accuracy using training data.
  • Mobile compatibility: Adapting for webcam-based mobile detection and landscape/portrait toggling.

Credits for Videos: (National Academy of Sports Medicine)

(National Academy of Sports Medicine)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages