Gaara AI
Technology

How the AI sees your shot,
frame by frame.

Coach AI combines YOLO computer vision with a PyTorch Transformer trained on cricket pose data — running on Azure, delivered through a React app you open in any browser.

The pipeline

Clip upload to coaching report in four stages.

Upload
Phone or webcam clip
YOLO-Pose
Keypoints + detection
Transformer
Pose-sequence classifier
Coaching
Scores + annotated video
Stage 1 · Computer Vision

YOLO-Pose & object detection.

Each video frame runs through Ultralytics YOLO-Pose to extract body keypoints, plus custom detectors that find the striker, bat, and ball — even in busy nets footage.

Those signals power both movement coaching (head stillness, footwork, balance) and stroke detection when the ball meets the bat.

Per clip
Body keypoints17+ joints
Player trackingCustom YOLO
Bat & ballContact detection
Video sampling~5–30 Hz
Stage 2 · Pose Sequences

From keypoints to shot motion.

Instead of raw pixels, we train on pose trajectories — a compact, angle-robust representation built from each stroke window. Left-handers are mirrored to a canonical stance automatically.

Stroke window

We isolate ~2 seconds around bat–ball contact — pre-load, impact, and follow-through.

Multi-ball sessions

For nets videos, motion peaks and contact scores find each ball; every stroke gets its own window.

Annotated replay

OpenCV and ffmpeg render an H.264 MP4 with skeleton overlay you can watch in the browser.

Stage 3 · Shot Recognition

PyTorch Transformer classifier.

A lightweight Transformer reads the pose sequence and predicts the shot type — cover drive, square cut, pull, sweep, defensive, and more. Trained on professionally annotated cricket pose footage.

01
Input
Pose sequence
Normalized keypoint trajectories around each stroke
02
Embedding
Linear + positional
Maps joints into a compact sequence representation
03
Transformer
Multi-head attention
Learns temporal shot patterns from pose motion
04
Classifier head
15+ classes
Cover drive, cut, pull, sweep, defensive, and more
05
Movement rules
Biomechanics
Head, balance, footwork, hip drive, follow-through
06
Output
JSON + MP4
Shot label, scores, coaching cues, annotated replay
Stage 4 · Cloud delivery

Secure ML on Azure, results in your browser.

Upload to API

Your clip is sent over HTTPS to our Flask API on Azure App Service. Models run inside Docker — no installs on your device.

Profile & history

Sign in with Supabase to save analyses, track trends, export PDFs, and compare good vs mistimed clips over time.

Always improving

We retrain on cleaner labelled data and deploy new weights without you changing apps — the same pipeline our ML team uses in research.

Stack

What Coach AI is built on.

YOLO-Pose (Ultralytics)
Body keypoints & movement analysis
Custom YOLO detectors
Player, bat, and ball tracking
PyTorch Transformer
Shot classification from pose sequences
OpenCV + ffmpeg
Video processing & H.264 annotated replays
Flask on Azure
Cloud ML API (Docker on App Service)
React + Vite
Coach AI app at app.gaaraai.com
Supabase
Auth, profiles, and analysis history
Vercel
Marketing site & frontend hosting

Want to license this stack?

We license our cricket coaching pipeline for academies and sports-tech products. Talk to us about your use case.