A complete computer vision–driven sports analytics project that extracts, analyzes, and visualizes badminton player movement to generate coach‑interpretable tactical insights.
This repository demonstrates how raw video and trajectory data can be transformed into advanced spatial analytics, similar to methods used in professional sports performance analysis.
Modern sports analytics goes beyond statistics, it focuses on space, movement, and decision‑making.
This project analyzes badminton player positioning using trajectory data derived from match footage, pose estimation and shuttle detection.
The goal is to answer questions such as:
- Who controls which areas of the court?
- How do players transition between attack and defense?
- Where does physical pressure peak?
- How disciplined is a player’s positioning?
All insights are derived purely from movement trajectories, making the approach scalable and camera‑agnostic.
- Extract player movement trajectories from video
- Normalize movements to a consistent court reference frame
- Quantify spatial dominance and court usage
- Compare players using interpretable visual analytics
- Present results in a portfolio‑ready, research‑grade format
- Detects the shuttlecock using a custom-trained YOLO11 model
The pipeline is modular and extensible, enabling future shot-type classification and rally-level analysis.
Below is a preview of the annotated badminton analytics output.
Badminton_Analytics_Project/
│
├── datasets/
│ └── Shuttlecock.v1i.yolov11/
│ ├── test/
│ │ └── ....
│ ├── train/
│ │ └── ....
│ ├── valid/
│ │ └── ....
│ ├── data.yaml
│ ├── README.dataset.txt
│ └── README.roboflow.txt
├── logs/
│
├── notebooks/
│ └── Badminton Analysis.ipynb
│
├── Results/
│ ├── RECOVERY POSITION (MEAN + DISPERSION)_20260105_115146_255325.png
│ ├── Player Trajectories Over Court_20260105_113759_732482.png
│ ├── players_speed_over_time.png
│ └── .......
│
├── Runs/
│
├── videos/
│ ├── Video Project 2.mp4
│ └── Video Project.mp4
│
├── weights/
│ ├── best.pt
│ └── last.pt
│
├── README.md
├── requirements.txt
└── .gitignore
- Python
- OpenCV – video processing
- YOLOv8 – player detection
- YOLOv8 Pose Estimation – player joint detection
- YOLO11 Object Detection – shuttlecock detection (custom trained)
- NumPy / Pandas – data processing
- Matplotlib – scientific visualization
- MoviePy – video/audio handling
- Players are detected using YOLOv8 pose estimation
- The body center (or ankle midpoint) is used as the player position
- Trajectories are stored as
(x, y, time)sequences
- Raw coordinates are normalized to a canonical court reference frame
- This allows fair comparison across frames, rallies, and players
- The court is divided into logical zones (Front/Mid/Back × Left/Right)
- Movement density, transitions, and dominance are computed
-
A YOLO11 object detection model is custom-trained to detect the shuttlecock -Training data is sourced from an open-source Roboflow dataset
-
Shuttle trajectories provide:
-
Temporal shot context
-
Spatial shot location
-Player–shuttle interaction alignment
-
This enables shot-type analysis (e.g., smash, drop, clear) by combining:
-
Shuttle movement patterns
-
Player position and movement dynamics
What it shows:
- Frame‑wise detection of players constrained inside the court polygon
- Bounding boxes adjusted to each player’s centre position
- The number at the start of the title indicates total detections inside court for that frame
What it shows:
- Frame‑wise detection of player keypoints using YOLOv8‑Pose
- Each skeleton represents a detected player with confidence score shown above the bounding box
- The number at the start of the title indicates total pose detections for that frame
Insight: Highlights posture, balance, and movement dynamics for both players.
What it shows:
- Relative spatial dominance between Player 1 and Player 2
- Positive regions indicate Player 1 control
- Negative regions indicate Player 2 control
Insight: Reveals tactical pressure zones and positional advantages.
What it shows:
- The total area of the court covered by each player
- Movement discipline vs roaming behavior
Insight: Players with smaller hulls often exhibit better positional discipline.
What it shows:
- Probabilities of moving between court zones
- Attack ↔ defense transitions
Insight: Highlights play style (aggressive vs defensive) and recovery behavior.
What it shows:
- Average movement speed per court location
- High‑intensity zones where explosive movement occurs
Insight: Identifies physically demanding regions of play.
What it shows:
- Average positioning over the entire rally
- Tactical reset tendencies
Insight: Elite players tend to recover closer to optimal central positions.
** 8. Other Visuals**
Player Trajectories Over Court
Player Movement Heatmap
Players Speed over Time
Speed over Frame
validation_metrics
- Spatial dominance comparison between players
- Identification of defensive vs offensive tendencies
- Court usage efficiency and discipline
- Physical load distribution across the court
- Movement strategy characterization
- Performance analysis for coaches
- Player scouting & comparison
- Sports science & biomechanics research
- Computer vision portfolio projects
- Movement behavior modeling
- Shuttle tracking and shot‑based analysis
- Rally‑level segmentation
- Injury risk indicators from asymmetry
- Time‑resolved fatigue analysis
- Interactive dashboard (Plotly / Streamlit)
Open the notebook:
colab notebook notebooks/Badminton_Analysis.ipynbMuhammad Yasin
Data Analytics | Computer Vision | Sports Analytics
Shuttlecock Detection Dataset
@misc{shuttlecock-cqzy3_dataset, title = {Shuttlecock Dataset}, author = {Mathieu Cartron}, howpublished = {https://universe.roboflow.com/mathieu-cartron/shuttlecock-cqzy3}, year = {2022}, month = {March}, note = {Accessed: 2026-01-05} }
-
Used for custom training of YOLO11 shuttlecock detection model
-
Enables shot-type and rally-context analysis
Tools
- Ultralytics YOLOv8
- Open‑source computer vision community
If you find this project useful, feel free to ⭐ the repository or reach out for collaboration.


_20260105_115142_056806.png)
_20260105_115142_989414.png)


_20260105_115146_255325.png)




