Automated Futsal Video Analysis for Performance Reporting
π― 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:
- Complete parallelization of the processing pipeline with CUDA Streams and TensorRT
- 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
π’ 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:
π¬ 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:
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 WindowPlayer Tracking & Detection |
π₯ Bottom-LeftTactical Heatmaps |
π Bottom-RightHomography 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
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:
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
π οΈ 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.