Skip to content

Asiwishchu/Human-Skeleton-Tracking

Repository files navigation

Human Skeleton Tracking

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).

Installation

pip install -r requirements.txt

Python 3.10–3.12 recommended (MediaPipe wheels lag the newest interpreter).

Run (desktop)

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 output

Press q to quit.

Run (web app)

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 8000

Then open http://localhost:8000.

Features

  • 33-point skeleton overlay with an ID box 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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors