Real-time, single-person skeleton tracking from a webcam or video file, with live
movement metrics drawn on top. Built with MediaPipe Pose + OpenCV in Python —
runs real-time on a laptop CPU, no GPU. Ships with a desktop OpenCV window and
a browser front-end, both sharing one analysis core (analysis.py).
pip install -r requirements.txtPython 3.10–3.12 recommended (MediaPipe wheels lag the newest interpreter).
python main.py # live webcam (camera 0)
python main.py --source path/to.mp4 # a video file
python main.py --record out.mp4 # also save the annotated outputPress q to quit.
Upload a clip, process it once, then play it back with the overlay — plus a live webcam mode.
python -m uvicorn webapp.server:app --port 8000Then open http://localhost:8000.
- 33-point skeleton overlay with an
IDbox and a fading trajectory trail. - 3D joint angles (knee + elbow) from world landmarks, so they hold up even when facing the camera.
- Smoothed speed in
px/s. - Squat rep counter + posture (Standing / Transition / Squatting) — counts only when both knees bend together and symmetrically.
- Heuristic activity recognition — Squat · Jumping Jacks · Push-ups · Standing · Walking · Running, with a live rep count. No ML, no training data.
See Human_Skeleton_Tracking_Report.pdf for
the write-up of approach, decisions, and limitations.