Inspiration

In the modern era of high-intensity football, the difference between winning a trophy and a mid-table finish often comes down to one thing: Availability.

Professional teams lose millions of dollars every year due to preventable soft-tissue injuries. We realized that while managers have access to "big data," they lack a unified system that combines physical match statistics with the psychological and emotional readiness of the player.


What it does

PitchPulse is an AI-driven high-performance management system that helps football managers optimize their squad and prevent injuries.

Data-Driven Readiness It pulls real match statistics (minutes, appearances, form) from API-Football to calculate a baseline readiness score for every player.

The ACWR Engine It uses the Acute:Chronic Workload Ratio to identify players in the "Danger Zone" who are at risk of injury due to workload spikes.

Selfie Vitals (rPPG) Using the Presage SDK, players perform a 30-second "Selfie Check-in" where the camera detects microscopic color changes in their skin to calculate:

  • Heart rate
  • HRV
  • Stress
  • Emotional state (Active, Dull, Happy, Sad) *Emotional state & Stress Levels *Biomechanics Movement Screen

Players record a simple 10-second squat video. Gemini Vision AI analyzes their mechanical load absorption (e.g., knee valgus, forward lean) to assign an instant physical risk band, dynamically updating their readiness score.

AI Action Plans Utilizing Gemini AI, the system analyzes a player’s entire week and provides a specific, one-sentence coaching recommendation (e.g., "Limit to 30 mins" or "Priority recovery").

AI Suggested XI Engine When it's game day, Head Coaches use our tactical engine. By feeding the upcoming opponent and the live squad readiness scores to Gemini, it instantly outputs the optimal formation and Starting XI, purposefully resting players who are in the "Danger Zone."


How we built it

The project is built on a high-performance stack designed for modularity and speed.

The Brain (Python/FastAPI) A robust backend that orchestrates data from multiple sources. We implemented a custom metrics engine to handle sports-science calculations.

AI Orchestration (Gemini) We used Gemini 2.5 Flash to analyze complex player contexts and generate tactical recommendations that sound like they came from a professional sports scientist.

*Mathematical Heart * Our risk engine is built on the ACWR principle:

$$ ACWR = \frac{\sum_{i=1}^{7} \text{Load}i}{\frac{1}{4} \sum{j=1}^{28} \text{Load}_j} $$

The system flags any player where:

$$ACWR > 1.5$$

as a high-risk candidate for injury.

Real-time Data (Supabase) PostgreSQL with real-time subscriptions ensures that when a player finishes a selfie check-in, the manager's dashboard updates instantly.

Infrastructure We deployed stable Cloudflare Tunnels to ensure low-latency communication between the Flutter mobile app and the Python backend.


Challenges we ran into

rPPG Edge Cases We discovered that when no face was present in the camera, the selfie SDK would output "stressed" junk data. We had to build an aggressive server-side pattern-matching filter to detect "No Face" scenarios and prevent them from ruining the player's readiness score.

API Orchestration Fetching, aggregating, and calculating scores for a 25-man squad in real-time from a third-party football API without hitting rate limits required careful async implementation.

Architecture Pivot Halfway through, we realized the complexity of a Vector DB was slowing us down for a live demo. We made the bold decision to remove the RAG architecture and pivot to a "Pure Gemini" context-driven analysis, which resulted in faster response times and more accurate tactical advice.


Accomplishments that we're proud of

rPPG Integration We successfully turned a smartphone camera into a medical-grade sensor that can tell a manager if their star striker is "Sad" or "Dull" before they even step onto the training pitch.

Data Accuracy Our baseline engine creates varied, realistic readiness scores (ranging from 20% to 95%) that actually reflect a player's real-world workload in the current 2026 season.


What we learned

We dove deep into the world of Remote Photoplethysmography (rPPG), learning how light absorption in the green spectrum can reveal a human pulse.

We also mastered the ACWR methodology, which is used by elite clubs like Liverpool FC and Real Madrid to manage their squads.


What's next for PitchPulse

GPS Live Sync Integrating with wearable devices (Catapult/GPS) to pull real-time training loads.

Team-Wide Load Balancing An AI algorithm to suggest the "Starting XI" that has the highest combined readiness score to maximize win probability.

Predictive Injury Modeling Using historical data to predict exactly when an injury is likely to happen before it occurs.

Built With

Share this project:

Updates