</>Levent.
Back to Projects
Other2025

Basketball Team and Score Detection System

An AI-powered analysis system that performs object detection and tracking on basketball match videos to separate players into teams, determine the ball handler, and automatically update the score by analyzing shots taken.

Overview

About the Project

This project is a computer vision system that analyzes basketball match videos to enable automatic statistics and score tracking.[cite: 1] In addition to detecting players and the ball, the developed system can determine which team the players belong to and who is currently in control of the ball.[cite: 1] Thanks to its user-friendly interface, the desired video can be uploaded to the system, and the analysis process can be easily initiated with resolution and hardware preferences.[cite: 1]

Key Features

  • Player and Ball Tracking: Using YOLO Object Tracking, a unique ID is assigned to each object detected throughout the video stream, and continuous trajectory tracking of the objects is performed.[cite: 1]
  • Dynamic Team Separation: Players are grouped according to feature similarities using the K-Means algorithm.[cite: 1] To increase the success of the algorithm, virtual crop areas focusing only on jersey color were created.[cite: 1]
  • Score and Ball Handler Detection: The player closest to the center of the ball is assigned as the ball handler.[cite: 1] To attribute the score to the correct team during a shot, a memory mechanism that records past ball contacts was integrated into the system.[cite: 1]
  • Custom Model Training: The initial model, which was insufficient, was retrained using the YOLOv8s architecture with a new dataset of 12,000 images prepared on Roboflow and supported by data augmentation techniques.[cite: 1]

User Interface

The project features a control panel that includes operations such as video uploading, model selection, resolution adjustments (e.g., 1280), and selecting the hardware unit to be used (e.g., CPU).[cite: 1]

Basketball Team and Score Detection System — 1