Skip to content

slaterdaniel/human-motion-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

133 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Human Motion Analysis: Tracking Athletic Performance, Injury Prevention, and Movement Disabilities

Preview:

Screenshot 2026-05-16 at 4 23 29 PM bottom-dash-preview

Contents:

Overview:

Current Capabilities:

This project aims to create an inexpensive and accessible system for analyzing human movement from video.

Using pose estimation and machine learning, the system extracts biomechanical features from videos of users sprinting to evaluate performance, detect movement patterns, and provide feedback suggestions.


Future Implementations:

The long-term goal is to support applications in:

  • Other athletic actions (baseball swing, barbell squat, basketball jumpshot, etc.)
  • Injury prevention feedback
  • Rehabilitation
  • Motor Planning
  • Movement Disorder Assessment

Project Motivations:

As a track athlete, I wanted to create a tool that people can use to evalutate sprint performance without access to expensive lab equipment.

I got the idea to expand the capabilites of the tool to help enhance motor planning because of my younger brother with special needs.


Pipeline:

Step Goal Tool Use
1 Pose Estimation MMPose, Yolo26, Mediapipe Extract pose landmarks, joint angles, velocities using the user's choice of an engine for pose estimation between: Google's MediaPipe, Ultralytics YOLO26, or OpenMMLab's MMPose libraries, with custom normalization to enable standard comparison across datasets.
2 Phase Identification Keras 1D Convolutional Neural Network Predict gait phases using a 1D Convolutional Neural Network that analyzes temporal patterns in user landmark sequences.

Phases are separated into:

- Left/Right Ground Contact (LGC/RGC)

- Left/Right Propulsion (LP/RP)

- Left/Right Flight (LF/RF)
3 Form Scoring Median Absolute Deviation (MAD) Compute deviation from reference motion patterns using Median Absolute Deviation (MAD) and calculate each feature's similarity scores over time using MAD-based Z-scores.
4 Output OpenCV, Matplotlib, Plotly Generate visualizations:

OpenCV:
- Dashboard Video containing Form Deviation over time, color coded skeleton, and form correction suggestions
- Phase Overlays of Correct Form

Matplotlib:
- Individual Z-scores over time
- Total Form Deviation Scoring over time
- Phase Z-scores over time

Plotly:
- Individual Phase Breakdown Isolation

Example:

Input & Skeleton Overlay

user_input.mp4

Biomechanical Dashboard (Annotated)

annotated_dashboard.mp4

NOTICE:

In dashboard video (pictured right), the large spike in Total Form Deviation at ~11sec aligns with form error of athletes left arm being raised This validates the ability of the pipeline to identify abnormalities in running form.

Outputted Metrics:

Full Video Analysis:

  • Dashboard Video
  • Feature Deviation Tracking
  • Total Form Deviation Tracking

Individual Phase Analysis:

  • Phase Overlay Videos
  • Phase Deviation Tracking
  • Phase Breakdown Tracking
  • Phase Breakdown Isolation

Ground Contact Statistics:

  • Ground Contact Times
  • Left / Right Imbalance
  • Strike Point Statistics

Example Outputs:

Metric Example Output
Dashboard Video
dashboard.mp4
Phase Overlay Videos overlay_example
Feature Deviation Tracking LEFT ELBOW X
Total Form Deviation Total_Z-Score
Phase Deviation Tracking Phase_Z-Scores
Phase Breakdown Isolation phase_breakdown_comparison
Ground Contact Stats

----------------STRIDE FREQUENCY----------------

202.068 Steps per Minute

--------------GROUND STRIKE POINTS--------------

Average Right Ground Strike Point:

0.6188


Average Left Ground Strike Point:

0.5970


Average Strike Point Imbalance: (negative = left | positive = right)

0.0217


--------------GROUND CONTACT TIMES--------------

Average Ground Contact Time:

Frames: 6

Seconds: 0.195


Average Right Ground Contact Time:

Frames: 6

Seconds: 0.193


Average Left Ground Contact Time:

Frames: 6

Seconds: 0.197

About

Vision-based human motion analysis pipeline for studying biomechanics in athletics, injury prevention, and rehabilitation for people with movement disorders.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages