This project demonstrates pose estimation on athlete videos using OpenCV and MediaPipe in Python. It tracks joint angles and generates annotated videos as well as plots for movement analysis.
- Detects human poses in videos using MediaPipe.
- Tracks joint angles (e.g., left elbow, right knee).
- Annotates and saves processed videos (
*_pose.mp4). - Plots joint angles over time for detailed analysis.
- Supports multiple athlete categories: Basketball, Boxing, Football, Athletics, etc.
-
Create and activate a Python virtual environment (Python 3.11 is recommended):
conda create -n pose_env python=3.11 conda activate pose_env
-
Install the required packages:
pip install opencv-python mediapipe matplotlib numpy
- Place your athlete videos inside the
Videos/folder. - Open
final.ipynbin VSCode or Jupyter Notebook. - Run the notebook cells in the following order:
- Imports & functions
- Define categories
- Analyze videos
- Plot joint angles
- Annotated videos will be saved automatically in the same folder with the
*_pose.mp4suffix.
Here is an example of the output you can expect from the project.
| Basketball Pose Estimation | Boxing Pose Estimation |
|
|
| Basketball Joint Angles | Football Joint Angles |
|
|
- Helps player to analyse their shooting posture
- Helps coaches to replan the training sessions for players
- For identifying skills
- Injury prevention, Rehabilitation Support



