Inspiration
As a badminton player and an engineering student, I’ve always watched sports analytics with fascination, but noticed that advanced tactical tracking tools are usually locked behind expensive proprietary systems reserved for elite professionals. I wanted to democratize this technology. The inspiration for Tactics AI came from a simple question: Can we take standard, everyday match footage and instantly extract professional-grade spatial data and tactical coaching insights using accessible Generative AI and computer vision concepts?
What it does
How we built it
Tactics AI is built as a self-contained web application using a modern Python and Generative AI stack: Frontend Dashboard: A clean user interface with configuration wizards allowing users to choose their court environment (e.g., Indoor Wooden Courts).
Video Processing Pipeline: Built using OpenCV to stream video frames via MJPEG efficiently from server to client.
Generative AI Intellect: Integrated with the Gemini 1.5 Engine via the Google AI Studio API. The AI handles contextual analysis, acting as a real-time tactical assistant that provides elite coaching feedback based on match conditions.
2D Tactical Radar: Maps spatial positions onto a dynamic overhead court model.
Challenges we ran into
Building a complex vision application inside a cloud workspace environment came with unique engineering hurdles:
Server-Side Video Restrictions: Public CDNs blocked our backend server-side video fetching requests. I overcame this by packaging a dedicated, optimized media pipeline directly inside the workspace directory.
Hardware & Compute Limitations: Running a full deep learning object detection framework like YOLOv8 requires heavy computational memory (RAM/GPU) that easily crashes standard container setups. To keep the application highly responsive and crash-free for a live presentation, I engineered a smooth Simulation Mode. This module uses mathematically pre-calculated coordinate drift arrays to seamlessly simulate real-time player tracking vectors on the 2D court model without degrading performance.
Accomplishments that we're proud of
Production Architecture: Successfully built and tied together an asynchronous video pipeline, a dynamic coordinate rendering engine, and a live generative AI assistant within a single cohesive dashboard layout.
Simulation Engine Design: Engineered a lightweight coordinate drift module to handle real-time tracking calculations cleanly without crashing the container due to hardware limits.
Security Implementation: Correctly handling platform environment variables securely to ensure the live engine scales safely.
What we learned
This project was an incredible learning experience as a first-year computer science student. I deeply strengthened my understanding of backend state management, working with asynchronous video streams in frameworks like Flask, and properly handling environmental variables and API security tokens through secure platform secrets. Most importantly, I learned how to build resilient software—discovering that when hardware limits prevent heavy model deployments, intelligent engineering design and synthetic data simulation can still deliver a powerful, interactive end-user experience.
What's next for Tactics AI
Full Model Integration: Moving beyond simulation vectors by deploying a specialized, downscaled detection script once server resources scale up.
Advanced Geometric Mapping: Upgrading the spatial plotting tool to calculate exact homograph transformation matrices for accurate pixel-to-court pixel projection. The relationship mapping a video frame point to the flat radar plane can be expressed via a matrix transformation Multi-Sport Profiles: Expanding the UI profile wizards to adapt seamlessly to tennis, volleyball, and basketball court configurations.
Built With
- and
- and-coordinate-tracking-logic.-flask-(or-fastapi):-the-lightweight-backend-web-framework-utilized-to-handle-server-side-processing
- and-serve-the-dashboard.-markdown-&-latex:-used-for-structuring-documentation
- and-stream-them-via-an-mjpeg-stream-from-the-server.-synthetic-drift-module:-a-custom
- answer
- apis-&-generative-ai-google-ai-studio-/-gemini-api:-the-foundational-ai-intellect-driving-the-live-interactive-coaching-assistant.-gemini-1.5-engine:-the-specific-model-utilized-via-api-to-handle-context-driven-spatial-data-analysis
- application
- array-based
- build-the-application-api-endpoints
- built
- chatbot
- constrained
- conversational
- coordinate
- coordinates
- decode-match-video-frames
- engineered
- geometric
- hardware
- host
- inside
- languages-&-frameworks-python:-the-core-language-used-to-manage-the-backend-state
- libraries-&-computer-vision-opencv-(opencv-python):-the-core-computer-vision-library-used-to-build-the-video-processing-pipeline
- live
- manage-dependencies
- mathematical
- mathematically
- platforms-&-cloud-services-replit:-the-cloud-based-development-environment-and-platform-used-to-write-the-code
- project-write-ups
- provide-elite-tactical-feedback
- queries
- real-time
- rendering
- safely
- scaling
- script
- simulate
- the
- to
- tracking
- user
- utilize-secure-environment-keys
- video-pipelines
- web
- within
Log in or sign up for Devpost to join the conversation.