Inspiration

Volleyball moves fast. A rally can end in seconds, and coaches on the sideline are constantly trying to absorb everything — player positioning, who's serving well, who's struggling on passes — while simultaneously directing the team. Existing stat tools are either too slow, too cluttered, or require a dedicated person to operate. We wanted to build something a coach could actually use in real time, without taking their eyes off the game. That idea became ACE.

What it does

ACE is a real-time volleyball analytics platform that combines a fast manual stat-tracking web app with a computer vision pipeline that works from live camera feeds or prerecorded video.

On the manual side, coaches can set up a roster, assign players to the court and bench, make substitutions mid-match, and record stats — points, spikes, pass ratings (0–3), sets, blocks, and serve zone accuracy — in one or two taps. Live stats update instantly so coaches can check performance without leaving the tracker.

On the computer vision side, ACE uses custom-trained YOLO models to detect the volleyball, track player movements across frames, classify game actions (spikes, serves, blocks, digs), and read jersey numbers using an OCR pipeline. All events flow through the same shared data model — whether entered by a human or generated automatically — and are synced to Firebase Firestore in real time so coaches can monitor a live game from any device.

How we built it

ACE is built in three integrated layers:

Web app + backend: A local-first web app with a FastAPI backend backed by SQLite for roster, match, and stat management. The event model is shared between manual entry and automated detection so both sources write identical stat records.

ML pipeline: A modular MLManager coordinates multiple YOLO models — a ball detector, a player detector, an action detector (spike/serve/block/dig classification), a game-state classifier, and a court segmentation model. Player tracking uses Norfair, and jersey number recognition runs through a separate parseq-powered OCR pipeline, cropping player torsos and reading numbers frame-by-frame to resolve track IDs to actual jersey numbers with configurable confidence thresholds.

Live game processor: A dedicated capture thread continuously pulls the latest frame from a webcam or RTSP stream, feeds it to the ML pipeline, attributes detected actions to the nearest tracked player, and writes structured events to Firestore — all in real time, with the system discarding stale frames to prevent lag accumulation.

Challenges we ran into

Jersey number recognition was surprisingly hard. Players move quickly, jerseys blur, numbers get occluded by arms — getting reliable reads required aggressive cropping of the torso region and voting across multiple frames before committing to an identity. Keeping the pipeline low-latency on consumer hardware meant we had to carefully separate the capture thread from the inference loop so slow frames don't cause the camera feed to fall behind. Shared event model: Making manual input and automated detections produce structurally identical stat records required upfront discipline in the data model, but it paid off when plugging in the CV layer. Graceful degradation: If the video pipeline fails mid-match, coaches need to keep working without interruption. Building the manual fallback as a first-class feature — not an afterthought — took real design effort.

Accomplishments that we're proud of

A coach can actually use the manual tracker during a real rally without fumbling — the interaction is genuinely fast. The full CV pipeline — ball tracking with a visual trajectory trail, multi-player tracking, action detection, and jersey OCR — runs end-to-end on a recorded match video and produces structured, queryable stat events. The shared event model works: automated detections and manual entries are indistinguishable at the data layer, which means both sources feed the same live stats view. Live Firestore sync means a coach's tablet and a stat keeper's laptop stay in sync without any manual coordination.

What we learned

Computer vision for sports is hard in ways that lab demos hide. Occlusion, motion blur, changing lighting, and camera angle all demand robust fallback logic that a clean test video never surfaces. Building the manual tool first was the right call — it forced clarity on the data model before any CV complexity was added, and it meant the demo always worked even when the ML models needed tuning. Jersey OCR is a worthwhile but humbling subproblem. We learned more about text recognition, confidence voting, and graceful failure modes than expected. Real-time systems require thinking in threads from the start — retrofitting concurrency into a single-threaded capture loop is painful.

What's next for ACE

AI match overview: An agentic model that reads accumulated stat events and generates coaching notes — patterns in serve zones, players struggling on pass rating, substitution timing suggestions — delivered during timeouts or after the game. Multi-camera support: Merging detections from two or more court angles to improve tracking continuity and reduce occlusion failures. Live jersey correction UI: A coach-facing interface to review low-confidence jersey reads and correct them without stopping the pipeline. Cloud deployment: Moving from localhost to a lightweight cloud backend so multi-device sync works over a network, not just local WiFi. Season analytics: Aggregating match-level stat events into a player development dashboard coaches can review week over week.

Built With

Share this project:

Updates