Case study

Soccer Match Analytics & Insights

The aim of this project is to give soccer analytics of matches being played. The goal is to build an AI tool that takes as input a video of a soccer match and then analyzes each player and extracts different analytics. This included: 1. Player and ball detection, 2. Player and ball tracking, 3. Player re-identification, 4. Field detection, 5. Event detection including passes, intercepts, goals etc.
  • Client: MiniStats
  • Industry: Sports & Media
  • AI capability: Computer Vision
Visit MiniStats (opens in a new tab)
Youth soccer match with each player boxed and numbered, ball trajectories drawn on the pitch and a ball possession panel showing 21% against 79%
The demo video loads from YouTube only when you press play.

The challenge

Twenty-two players, one ball, and a camera that keeps moving

Soccer matches are dynamic environments with variable lighting, camera movement, and frequent occlusions. MiniStats required a system that could not only detect players and the ball but also maintain their identities across the entire match, even when players exit and re-enter the frame in low-quality footage where facial recognition is impossible.

What we built

From match video to match events

Detection, tracking, team assignment, then events read from the ball's movement.

  1. Stage 1

    Player and Ball Detection

    For player and ball detection we annotated about 10 videos and trained a YOLOv8 model.
  2. Stage 2

    Player and Ball Tracking

    For player and ball tracking we used NorFair tracker.
  3. Stage 3

    Team Identification

    We also detect which player belongs to which team. To accomplish this, we experimented with several methods, including using DBSCAN and k-Means for clustering. In our clustering approach, we utilized different features such as color histograms, shirt images (extracting the upper region of the bounding box analytically), and the complete bounding box. We found that the combination of k-means clustering and the complete bounding box image of a person yielded the best results.
  4. Stage 4

    Event Detection Logic

    For event detection we detected the position of the ball and the person closest to the ball and detected events based on the ball’s motion. For example, if the ball moved from near one person to another person of the same team, then this was considered a pass. Alternatively, if the ball moved from near one person to another person of another team then this was considered as an intercept.
  • Demo recording: players and the ball tracked through a match, with events derived from ball movement.

The impact

Coaches get numbers instead of impressions

  • Players and ball tracked through the match
  • Teams assigned automatically
  • Passes and intercepts derived from ball motion

The tool automatically derives insights that help players and coaches identify specific areas for improvement. By quantifying metrics like ball possession duration, successful pass rates, and defensive intercepts, MiniStats provides a scientific basis for player development and tactical analysis.

Book a strategy session

Talk to an AI engineer about your project

Tell us what you want to automate. The first call is a 30-minute working session with an engineer, not a sales pitch.

  • Send the form, it takes 2 minutes
  • We reply within 1 business day, under NDA if you need it
  • A 30-minute call to scope feasibility and next steps

Tell us about your project

By submitting, you agree to our Privacy Policy. We never share your details.