- 🤺 A fencing official focused on athlete development — Peter Lian
- 🏑 A competitive hockey athlete — Alex Yuan
- 🧊 A lifelong hockey fan — Andy Yu
Tactical understanding in sports often lags behind physical training — especially for athletes outside of professional systems. We built Hockey Tactical Video Analyzer to make tactical education more accessible, visual, and actionable using AI.
This tool empowers players and coaches to upload real game footage, receive frame-by-frame insights, and generate AI-powered coaching feedback — all in seconds.
Hockey Tactical Video Analyzer is a full-stack AI system that helps players and coaches:
- Upload any hockey video
- Automatically extract key frames
- Analyze player positioning, puck movement, and tactical setups with AI
- Generate both per-frame feedback and holistic coaching summaries
- Visualize results through a simple browser interface
| Layer | Tools & Frameworks |
|---|---|
| Frontend | HTML, CSS, (JavaScript for upload logic) |
| Backend | Python (Flask, Flask-CORS) |
| AI Engine | Ollama + LLaVA (Vision-Language Model) |
| Video Processing | OpenCV |
| Data Output | JSON (per-frame) & TXT (summary) |
Make sure you have Python 3.9+ installed, then run:
pip install opencv-python flask flask-corsInstall and start Ollama locally with the LLaVA model:
ollama run llavaRun the Flask server:
python backend/server.pyThis will expose an /upload endpoint for video analysis.
Simply open index.html in your browser.
- Upload a hockey video
- Confirm and process
- Watch analysis logs in your console or alert box
- Review coaching insights per frame and overall game summary
hockey-analyzer/
├── backend/
│ ├── full_pipeline.py # Frame extraction + AI analysis
│ ├── server.py # Flask backend API
│ ├── frame_reports.json # Per-frame tactical analysis
│ ├── holistic_report.txt # Overall game summary
├── frames/ # Extracted video frames
├── index.html # Frontend interface
├── style.css # Frontend styling
- The user uploads a hockey video from the frontend
- Flask backend saves it and runs
full_pipeline.py - Frames are extracted every second using OpenCV
- Each frame is analyzed via LLaVA to detect tactical elements
- The system generates both per-frame and holistic reports
- Results are sent back to the frontend for display
- Add section tagging (Breakout, Zone Entry, Scoring Chance)
- Build an interactive feedback viewer UI
- Deploy as a full web app for coaches and teams
- Expand to multi-sport tactical models
MIT License — free to use, modify, and share.
Special thanks to Hack the Valley 2025 for hosting an inspiring event, and to the open-source community behind Flask, OpenCV, and Ollama for making rapid AI prototyping possible.