AI Personal Trainer
Real-time pose estimation for accessible physiotherapy feedback
AI / Computer Vision / Health Technology
Project Story
I started AIPT after a lower-back spasm from badminton. In physio, every repetition felt safe because someone was watching my posture and correcting me immediately. At home, the same exercises felt different. I kept wondering whether I was helping the injury or making it worse. That was the starting point: could a normal laptop camera act like a second pair of eyes when a physio or coach is not there?
Why I Built It
The problem was not just counting reps. The real problem was confidence. Rehab exercises only work if you do them consistently and correctly, but most people do them alone between appointments. I also had friends recovering from knee injuries who felt the same hesitation: they wanted to train, but they did not fully trust their form.
What I Built
I built a desktop app around MediaPipe, OpenCV, and a Tkinter interface. The camera finds body landmarks, my code turns those landmarks into joint angles and movement phases, and the app gives direct cues such as back position, knee drift, and range of motion. I also added an injury-aware flow so the user can enter pain location, sport history, and recovery context before starting.
What I Did
- Designed and built the full app from the original idea to a working prototype
- Wrote the pose-estimation, angle-calculation, smoothing, and repetition logic
- Built the GUI so the feedback felt like coaching rather than raw data
- Tested the app on real rehab-style movements and tuned it from repeated video trials
- Presented the project at ETH KI Challenge 2025
How I Built It
Build Flow
Webcam input -> MediaPipe pose detection -> joint angle computation -> threshold comparison -> real-time UI feedback loop.
How It Works
The app reads webcam frames, extracts 33 body landmarks with MediaPipe, ignores low-confidence landmarks, and smooths the motion so a single bad frame does not trigger a false warning. For each exercise, it watches the angles that matter most, such as knee flexion, torso position, elbow angle, or back alignment, then uses multi-frame checks to decide whether a rep actually happened.
Software
- Python
- MediaPipe
- OpenCV
- Tkinter
What Was Hard
- Early versions sometimes treated furniture as body landmarks, which made the feedback obviously wrong
- Noisy keypoints made the rep counter jump unless I smoothed the motion over time
- Different camera angles and body types changed the joint ranges more than I expected
- The feedback had to be short enough to read while exercising
Build Reference
Data path from user input to camera capture, pose landmarks, joint-angle logic, corrective feedback, and plan generation.
Click to inspect
Demos and Build Notes
Product Demos
Photos and Notes
Project photos
Technical Evidence
Screenshots
Downloads
Results & Impact
- 1st Prize, AI for Good - ETH KI Challenge 2025
- Working prototype with real-time corrective feedback, rep counting, and form scoring
- Prize funding and investor interest created a path to expand the exercise and injury library
- Validated approach for accessible at-home rehabilitation support
What I Learned
- Pose estimation accuracy depends heavily on camera angle, lighting, confidence filtering, and temporal smoothing
- In health tools, a wrong cue can be worse than no cue, so feedback must be conservative and legible
- The most useful interface is the one that gives confidence during the exact moment of uncertainty
Next Steps
- Mobile deployment with on-device inference
- Exercise library expansion with clinician-validated protocols
- Integration with progress tracking and session history