Skip to content
MH
All projects
Computer VisionAI/ML

CricketVision AI

Computer Vision / Deep Learning / Sports Analytics

An end-to-end computer vision platform that detects and tracks players and the ball, reconstructs ball trajectory, reads batting pose, classifies shots, infers cricket events, and rolls everything into per-delivery analytics behind a REST API and a web dashboard.

Year
2025
Role
Solo — research, engineering, deployment
Source
Public repository
CricketVision AI — concept diagram

Technologies

  • Python
  • YOLO
  • PyTorch
  • ByteTrack
  • Pose Estimation
  • Kalman Filter
  • FastAPI
  • Docker

The problem

Cricket analysis is still largely manual. Coaches and analysts watch footage frame by frame to note deliveries, shots and field placements. The raw signal — where the ball went, how the batter moved, what shot was played — is locked inside pixels, so nothing downstream can query it.

The solution

A staged vision pipeline that converts video into a delivery table: one structured row per delivery, from which every analytic is computed. Each stage is independently testable and swappable, and the whole pipeline is exposed through a REST API with a web dashboard on top.

Architecture

How it is put together.

01

Detection

A trained YOLO detector locates ball, batsman, bowler, fielder, wicket, wicket-keeper and umpire on every frame.

02

Tracking & roles

ByteTrack / BoT-SORT hold persistent identities across frames; geometric rules then assign cricket roles to those tracks.

03

Ball trajectory

A dedicated ball pass feeds trajectory reconstruction — Kalman filtering, gap interpolation and bounce detection — plus release, mean and max speed.

04

Pose & shot classification

COCO-17 keypoints give joint angles and batting-technique features; an R(2+1)D-18 video action model classifies ten cricket shots.

05

Event detection

delivery_start, ball_bounce, bat_contact, shot, fielding_event and boundary events fire with confidences attached.

06

Analytics & delivery table

Shot distribution, pitch maps, heat maps and statistical tests are computed from the per-delivery table and served via API to the dashboard.

Key features

What it actually does.

  • Multi-class player and ball detection tuned for broadcast footage
  • Persistent multi-object tracking with cricket-aware role assignment
  • Ball trajectory reconstruction with bounce detection and speed estimation
  • Pose-derived batting technique features
  • Video action recognition for ten-class shot classification
  • Confidence-scored cricket event timeline
  • Pitch maps, heat maps and shot-effectiveness analytics
  • REST API plus a web dashboard, containerised with Docker

Engineering challenges

The parts that were hard.

The ball is tiny and fast

At broadcast resolution the ball occupies a handful of pixels and disappears for whole stretches. A separate detection pass plus Kalman filtering and gap interpolation reconstructs a continuous flight path from an intermittent signal.

Unsegmented footage is harder than clips

A model that classifies pre-cut clips well degrades on continuous video where boundaries are unknown. Measuring end-to-end rather than clip-level accuracy kept the evaluation honest.

Pixels are not metres

Speed in pixels per second is meaningless across camera angles. A pitch homography converts to km/h where calibration is available, and the pipeline reports uncalibrated units where it is not.

Outcomes

What came out of it.

Qualitative outcomes only — no invented benchmarks or metrics.

01

A reproducible pipeline — every documented figure regenerates from a script

02

Experiments documented with what each number measures and excludes

03

Structured per-delivery output that downstream analytics query directly

04

Containerised API and dashboard ready to run on new footage

Next project

AI ID Verification & Fraud Detection

Identity-document verification combining OCR, face analysis, spoof and deepfake detection.

Let’s build

Want something like this for your business?

Tell me the problem and I will come back with an architecture, a scope and a timeline.