This project leverages the YOLO (You Only Look Once) object detection algorithm to analyze football matches. It includes various modules for estimating camera movement, assigning players and balls, estimating speed and distance, and transforming views. The primary goal is to provide insightful analysis through automated detection and tracking.
- Camera Movement Estimation: Determines the movement of the camera to stabilize the footage.
- Player and Ball Assignment: Identifies and assigns players and balls in the footage.
- Speed and Distance Estimation: Calculates the speed and distance covered by players.
- Team Assignment: Differentiates between teams.
- View Transformation: Adjusts the perspective of the footage for better analysis.
- YOLO Inference: Utilizes a pre-trained YOLO model for object detection.
- Clone the repository:
git clone https://github.com/harrionparrix/football-analysis-using-YOLO.git cd football-analysis-using-YOLO
- Install the required dependencies:
pip install -r requirements.txt
- Prepare your video data from any dataset.
- Run the detection using training_yolo and save the best models in ./models
- Run the main script to start the analysis:
python main.py
To train the YOLO model, use the training_yolo.ipynb
notebook:
- Open the notebook in Jupyter.
- Follow the steps to train the model with your dataset.