Skip to content

1Divy1/Football-Tracking-Computer-Vision

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Computer Vision Challenge (Football)

This project contains Python scripts for computer vision tasks related to football, specifically 2D football detection and trajectory tracking.

Setup

  1. Clone the repository:

    git clone https://github.com/1Divy1/Computer-Vision-Challenge-dotLumen.git
    cd computer-vision-challenge
  2. Create and activate a virtual environment (recommended):

    python -m venv .venv
    source .venv/bin/activate  # On Windows, use `.venv\Scripts\activate`
  3. Install dependencies: The project uses ultralytics for YOLO models and opencv-python. You can install them via pip:

    pip install ultralytics opencv-python
  4. Download the YOLO model: Ensure you have the yolo11n.pt model file in the computer_vision_models/ directory. If it's missing, you might need to download it from the Ultralytics official sources or train your own.

Usage

The main script main.py orchestrates the different computer vision tasks.

Running the application

python main.py

Configuration

  • Video File: The input video is expected at data/rgb.avi. You can change this path in main.py.
  • Output Folder: All generated output videos will be saved in uniquely named subfolders within the output/ directory. This folder is automatically created if it doesn't exist.

Functionalities

Currently, the project supports:

  1. 2D Football Detection: Detects footballs in video frames and generates an output video with detections.
  2. Football Trajectory Tracking: Tracks the trajectory of detected footballs and overlays the path on the video.

Output

Processed videos will be saved in the output/ directory, organized into subfolders with timestamps for each run.

Feel free to explore and modify the main.py, trajectory_tracking.py, two_dimensional_football_detection.py, and utils.py files to customize behavior.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages