This project aims to detect football players in video footage using the YOLOv8 (You Only Look Once version 8) model. YOLOv8 is a state-of-the-art, real-time object detection system. This repository includes a Jupyter Notebook for model implementation and an example output video demonstrating the detection.
This repository contains the code to detect football players in videos using the YOLOv8 object detection model. The YOLO model is known for its speed and accuracy, making it suitable for real-time applications like sports analytics.
- YOLOv8: An advanced version of the YOLO object detection algorithm.
- Python: The main programming language used.
- Jupyter Notebook: For interactive coding and visualization.
- OpenCV: For video processing.
- Numpy: For numerical operations.
- Pandas: For data manipulation and analysis.
To run this project locally, follow these steps:
- Clone the repository:
git clone https://github.com/dasdebanna/Football-Player-Detection-YOLOv8.git
- Change the directory:
cd Football-Player-Detection-YOLOv8
- Create a virtual environment:
python -m venv venv
- Activate the virtual environment:
- For Windows:
.\venv\Scripts\activate
- For macOS/Linux:
source venv/bin/activate
- For Windows:
- Install the required packages:
pip install -r requirements.txt
Open the football-player-detection-yolov8.ipynb
Jupyter Notebook to see the implementation details and run the model. The notebook includes steps to:
- Load and preprocess the data.
- Initialize and load the YOLOv8 model.
- Perform player detection on sample videos.
- Visualize and save the output.
To run the notebook, use the following command:
jupyter notebook football-player-detection-yolov8.ipynb
YOLOv8 (You Only Look Once version 8) is a real-time object detection model known for its speed and accuracy. It processes images in a single pass, making it efficient for tasks requiring real-time performance.
Key Features of YOLOv8: Real-time processing: Capable of processing images at high frame rates. High accuracy: Improved object detection accuracy compared to previous versions. Versatility: Can be used for various object detection tasks.
The output video (output.mp4) in the repository demonstrates the player detection capabilities of the YOLOv8 model. The notebook provides a detailed walkthrough of the detection process and visualization of results.
Contributions are welcome! Please fork this repository and submit pull requests for any enhancements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for more details.