All projects
Computer Vision / Deep Learning / Sports Analytics

CricketVision AI

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
Engagement
Research, engineering and deployment
Focus
Computer Vision, AI/ML
Status
Open source
CricketVision AI — architecture overview

01 — 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.

02 — Our 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 works

The pipeline, step by step — from the first input to the final output.

  1. 01

    Detection

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

  2. 02

    Tracking & roles

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

  3. 03

    Ball trajectory

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

  4. 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.

  5. 05

    Event detection

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

  6. 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.

Features

What we built

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
Impact

The outcomes

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

Engineering notes

Challenges we solved

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.

Technology stack

PythonYOLOPyTorchByteTrackPose EstimationKalman FilterFastAPIDocker

Want results like these?

Book a free 30-minute discovery call. We'll map out your project, recommend the right stack and send a fixed quote within 48 hours.