Automated Futsal Video Analysis for Performance Reporting

April 2025 Sports analytics SPORTSCORE Paris, France (Remote) April 2025 - October 2025
Automated Futsal Video Analysis for Performance Reporting
Computer Vision YOLOv11 DeepSORT Sports Analytics Action Recognition Multi-Object Tracking Deep Learning OCR Homography CUDA TensorRT Parallel Processing
Confidential Project
View Demos

🎯 Executive Summary

During my 7-month final-year internship at SPORTSCORE (April - October 2025), I developed an intelligent end-to-end AI pipeline for automated video analysis of futsal matches. The system transforms raw multi-camera footage into structured tactical insights by automatically detecting, tracking, and classifying player actions such as passes, shots, dribbles, interceptions, and goals.

This project involved two major technical contributions:

  1. Complete parallelization of the processing pipeline with CUDA Streams and TensorRT
  2. From-scratch development of an intelligent action detection module

πŸ† Key Achievements

Performance Metrics

  • βœ… 88% global system accuracy across all action types
  • βœ… 100% precision on pass detection
  • βœ… 99.95% accuracy in frame classification (YOLOv11m-cls)
  • βœ… 90.1% precision in ball detection (fine-tuned YOLOv11x)
  • βœ… 83.4% recall on ball tracking (mAP@50)

Optimization Results

  • πŸš€ +46.7% performance gain through parallelization
  • πŸš€ Γ—1.88 speedup (22:57 β†’ 12:12 for 1:14 video)
  • πŸš€ 33% frames automatically filtered (non-relevant sequences)
  • πŸš€ 2-2.5Γ— inference speedup with TensorRT optimization

Business Impact

  • πŸ’Ό 80% reduction in manual annotation workload
  • πŸ’Ό 5Γ— increase in match processing throughput
  • πŸ’Ό €10,000/month estimated cost savings

πŸ“… Project Timeline

Project Timeline: April - October 2025 APR 2025 Pipeline Setup πŸ”§ MAY 2025 Frame Classification 99.95% 🎯 JUN 2025 Parallelization CUDA + TensorRT +46.7% ⚑ JUL 2025 Action Detection 1208 lines 11 actions 🎬 AUG 2025 Ball Detection Fine-tuning 90.1% ⚽ OCT 2025 Integration & Deployment 88% acc πŸš€ Setup & Research Development Optimization Deployment

🏒 Company Background: SPORTSCORE

SPORTSCORE is an innovative French company specializing in real-time sports data exploitation using AI and computer vision.

What They Do

  • πŸ“Š Automatic extraction of key events and statistics
  • πŸ“ˆ Advanced tactical metrics generation
  • 🎨 Interactive visualizations for analysts
  • πŸŽ₯ Multi-sport video analysis solutions

Target Clients

  • Professional clubs and federations
  • Video analysts and coaches
  • Sports media and broadcasters
  • Performance analysis teams

Mission: Transform sports through automation, precision, and speed of analysis.


🎯 Project Objectives

Primary Goals

1. Intelligent Frame Filtering

  • Automatically exclude non-relevant sequences (replays, timeouts, transitions)
  • Reduce processing load and eliminate false positives
  • Focus computational resources on actual gameplay

2. Automated Action Detection

  • Detect and classify key actions: passes, shots, dribbles, interceptions
  • Generate structured event data in JSON format
  • Ensure real-time or near-real-time processing

3. Pipeline Optimization

  • Implement parallelization techniques (CUDA Streams, TensorRT)
  • Reduce processing time by 40%+
  • Enable scalable multi-match processing

4. Tactical Visualizations

  • Produce heatmaps showing player positioning
  • Generate pass maps and trajectory plots
  • Export comprehensive performance reports

5. Reduce Manual Workload

  • Minimize human annotation effort by 80%
  • Accelerate production of actionable insights

πŸ—οΈ Technical Architecture

System Overview

The pipeline consists of 7 interconnected modules that process video input sequentially, with a foundational parallelization layer ensuring optimal performance:

Pipeline Architecture πŸŽ₯ VIDEO INPUT Multi-Camera Futsal Footage ⚑ MODULE 0: Parallelization Layer β”œβ”€ CUDA Streams (4 parallel GPU streams) β”œβ”€ TensorRT: 2-2.5Γ— inference speedup └─ Result: +46.7% gain, Γ—1.88 speedup 1 MODULE 1: Frame Classification β”œβ”€ YOLOv11m-cls (67,801 images trained) └─ 99.95% accuracy, 33% frames filtered 2 MODULE 2: Detection & Tracking β”œβ”€ YOLOv11x fine-tuned: 90.1% precision └─ DeepSORT: Multi-object tracking 3 MODULE 3: Spatial Projection β”œβ”€ Homography: Pixel β†’ Pitch coords └─ 2D tactical positioning 4 MODULE 4: Player Re-ID β”œβ”€ HSV Clustering: Team assignment └─ OCR: Jersey number recognition 5 MODULE 5: Pose Estimation β”œβ”€ 17 keypoints per player └─ Posture analysis for actions 6 MODULE 6: Action Detection ActionDetector.py - 1208 lines β”œβ”€ 7 Pass Types + 2 Goals + 2 Defense β”œβ”€ 11 Total Action Types └─ 88% accuracy, 100% on basic passes πŸ“Š STRUCTURED OUTPUTS β”œβ”€ JSON: actions_data.json β”œβ”€ Heatmaps: Pass networks, shot zones └─ Video: Annotated footage ⚑ +46.7% Performance | Γ—1.88 Speedup βœ… 88% Global Accuracy | 100% Pass Detection

🎬 System in Action

Real-Time Analysis Dashboard

The image below shows the complete system running on a FIFA Futsal World Cup 2021 match (Portugal vs Morocco). This demonstrates the full pipeline operating in real-time with three synchronized visualization windows:

System in Action - Real-Time Dashboard

Real-time analysis dashboard β€” Player tracking, tactical heatmaps, and homography projection
FIFA Futsal World Cup 2021: Portugal 3-2 Morocco (2nd Period, 9:37)


Dashboard Components

🎯 Main Window

Player Tracking & Detection

πŸ”₯ Bottom-Left

Tactical Heatmaps

πŸ“ Bottom-Right

Homography Projection


1️⃣ Main Window: Player Tracking

  • βœ… Real-time player detection with YOLOv11x (colored skeletons)
  • βœ… Player identification with jersey numbers and confidence scores
    • Yellow team (Portugal): IDs 17, 21 (B. Bakkali 0.88, S. El Mesrar 0.81)
    • Green team (Morocco): IDs 1, 8, 10, 16, 18 (with confidence scores)
  • βœ… Ball tracking with trajectory prediction (yellow marker)
  • βœ… Bounding boxes with team color coding (yellow/green)
  • βœ… Score overlay: POR 3-2 MAR, 2nd period, 9:37
  • βœ… Pass counter: Real-time statistics (Morocco: 21 passes)

2️⃣ Bottom-Left: Heatmaps Window

  • πŸ”₯ Tactical positioning heatmap showing player presence zones
  • πŸ”΄ Red zones: High-intensity areas (attacking third, penalty area)
  • πŸ”΅ Blue zones: Defensive positioning and coverage
  • βšͺ Circle marker: Current ball position on tactical map
  • πŸ“Š Purpose: Analyze team formation, pressing patterns, and spatial dominance

3️⃣ Bottom-Right: Homography Window

  • 🎯 Projected trajectories on 2D pitch representation
  • 🟒 Green lines: Pass networks and ball movements
  • βšͺ White lines: Player movement paths
  • 🏟️ Top-down view: Pixel coordinates transformed to real-world pitch positions
  • πŸ“ Purpose: Tactical analysis, distance calculation, zone-based action detection

Key Observations from This Frame

Category Details
⚽ Match Context Portugal 3-2 Morocco β€’ 2nd period, 9:37 β€’ FIFA Futsal World Cup Lithuania 2021
🎯 Tactical Situation Morocco (green) attacking with 21 completed passes β€’ Portugal defending with 4 players β€’ High-pressure zone
βœ… System Performance 9/9 players detected β€’ 100% team assignment accuracy β€’ OCR: 7 jersey numbers β€’ Confidence: 0.81-0.91 β€’ Real-time heatmap & homography

πŸš€ Contribution 1: Pipeline Parallelization

πŸ“ File: parallel_tracker.py (1,041 lines)

Complete optimization of the original tracker integrating three major optimizations.

Performance Comparison

Before vs After Optimization 25 min 20 min 15 min 10 min 5 min Original tracker.py 22:57 Optimized parallel_tracker.py 12:12 +46.7% Faster Γ—1.88 Speedup Factor Nearly 2Γ— faster processing -47% Time Reduction 10:45 minutes saved

Optimization Techniques

Optimization Implementation Result
CUDA Streams 4 parallel GPU streams for model loading 10-15 sec saved at startup
Frame Classification Skip 33% non-relevant frames (replays, ads) 5-7 minutes saved per video
TensorRT Integration Optimized inference engines 2-2.5Γ— speedup (45-60 FPS)

🎯 Contribution 2: Action Detection Module

πŸ“ File: ActionDetector.py (1,208 lines)

Complete class developed from scratch implementing detection and classification of 11 different action types.

Detected Action Types

The system implements a comprehensive taxonomy of futsal actions, covering all critical gameplay events:

11 Action Types Detected PASS ACTIONS (7) Basic PASS 100% Progressive PASS 95% Into-Penalty-Area PASS 92% Pressure PASS 88% SMART PASS 90% Key PASS 95% Incomplete PASS 85% GOAL ACTIONS (2) Assist 100% GOAL 100% DEFENSIVE (2) INTERCEPTION 80% RECOVERY 82% SYSTEM PERFORMANCE 125+ Total Detections 88% Global Accuracy 1,208 Lines of Code

Pass Actions (7 types)

Action Type Description Detection Criteria
Basic PASS Standard successful pass between teammates Ball possession change between same-team players
Progressive PASS Pass that advances the ball toward opponent’s goal Distance traveled > threshold toward attacking third
Into-Penalty-Area PASS Pass delivered into the opponent’s penalty box Destination coordinates within penalty zone
Pressure PASS Pass executed under defensive pressure Opponent within 2m radius during execution
SMART PASS Tactically intelligent pass (through ball, switch) Geometric analysis of passing lanes
Key PASS Pass directly leading to a shot opportunity Followed by shot attempt within 3 seconds
Incomplete PASS Attempted pass that fails to reach teammate Interception or out-of-bounds detection

Goal Actions (2 types)

Action Type Description Detection Criteria
Assist Final pass before a goal is scored Last pass before goal event
GOAL Ball crosses the goal line Ball detection in goal area + score validation

Defensive Actions (2 types)

Action Type Description Detection Criteria
INTERCEPTION Defensive player interrupts opponent’s pass Possession change from opponent during ball flight
RECOVERY Regaining possession of loose ball Possession acquisition without active pass/interception

Performance Metrics by Action Type

Action Type Precision Detections Notes
All Passes (Basic) 100% 43 Perfect classification
Progressive PASS 95% 12 Threshold-based detection
Into-Penalty-Area PASS 92% 8 Geometric zone validation
Pressure PASS 88% 15 Proximity-based detection
SMART PASS 90% 6 Tactical pattern recognition
Key PASS 95% 14 Temporal correlation with shots
Incomplete PASS 85% 9 Requires ball trajectory analysis
Assist 100% 3 Validated against goals
GOAL 100% 3 Ball + score correlation
INTERCEPTION 80% 5 Complex multi-player analysis
RECOVERY 82% 7 Loose ball detection
TOTAL (Global) 88% 125+ Weighted average across all actions

πŸ“Š Final Metrics Summary

Project Metrics at a Glance 88% Global System Accuracy Γ—1.88 Processing Speedup +46.7% Performance Gain -80% Manual Workload 2,249 Lines of Code (parallel_tracker + ActionDetector) 11 Action Types Detected 7 Mo. Internship April - October 2025

πŸ› οΈ Technical Stack

Deep Learning Frameworks

  • PyTorch 2.0 - Model training and inference
  • Ultralytics YOLOv11 - Object detection (v11m-cls, v11x)
  • TensorRT 8.6+ - Optimized inference engines
  • CUDA 11.8+ - GPU acceleration

Computer Vision Libraries

  • OpenCV 4.8+ - Video processing, homography
  • DeepSORT - Multi-object tracking with Re-ID
  • PaddleOCR - Jersey number recognition
  • Tesseract 5.0 - Backup OCR engine

Hardware

  • Training: NVIDIA RTX 3090 (24GB VRAM)
  • Inference: NVIDIA RTX 4060 (8GB VRAM)

πŸ‘¨β€πŸ’» About This Project

Duration: April 2025 - October 2025 (7 months)
Type: Final-Year Internship (Master’s in Artificial Intelligence & Virtual Reality)
Institution: Ibn Tofail University, Faculty of Sciences, Kenitra, Morocco
Company: SPORTSCORE (Paris, France - Remote)

Defense Jury

  • President: Mr. Anass Nouri (FSK, Ibn Tofail University)
  • Examiner: Mrs. Khadija Lekdioui (FSK, Ibn Tofail University)
  • Examiner: Mrs. Khaoula Boukir (ENSC, Ibn Tofail University)

Defense Date: October 2025
Grade: Très Bien (Excellent)


πŸ“§ Contact

Author: Hicham El Mehdi
Email: mehdihicham736@gmail.com
LinkedIn: linkedin.com/in/elmehdihicham
GitHub: github.com/MehdiHCH

Company: sportscore.tech


This project represents a significant step toward fully automated sports video analysis, combining cutting-edge AI (parallelization, deep learning, spatio-temporal reasoning) with domain expertise to deliver actionable insights for coaches, analysts, and federations.