Work · KhiladiPro · Sole Engineer

Annotation.

A model-in-the-loop annotation platform spanning six sport-specific surfaces across cricket and badminton. Not a labelling tool. A data-flywheel — every keystroke produces a structured prediction/correction delta that feeds the next training cycle. The platform isn't measured by what it labels. It's measured by how much better the models get because of what it labels.

Role
Sole Engineer
Surfaces
6 Sport-Specific
Flywheel Lift
+10pp Acc
Pixel Error
−70%+
01 / The Problem

Sport-agnostic annotators can't see the sport.

Sports CV models live or die by the quality of their training data. At KhiladiPro we ship trajectory, keypoint, and event-detection models across cricket and badminton — every one of them needs frame-level supervision: where is the shuttle in frame 247? Which four points define the bat? Did the ball pitch IN or OUT? Are these 10 court corners detected correctly?

Off-the-shelf annotators (CVAT, Labelbox, V7) are sport-agnostic. They treat a shuttle, a cricket ball, a bat quadrilateral, and a 10-point court grid as the same generic "draw a thing" task — which means a 90-second rally takes 40 minutes to label, and reviewers can't catch sport-specific errors. A "landing" frame that's physically impossible. A stumps box that doesn't enclose the wickets. A court corner placed off the singles line.

I built the KhiladiPro Annotator to collapse that loop. Model-first. Sport-aware. The model labels the video first — the annotator only corrects what's wrong — and every keystroke is shaped around the physics of the sport being labeled.

02 / The Flywheel

A data-flywheel, not a labelling tool.

The architectural decision that turns annotation from a cost center into a continuously-improving training-data pipeline. Every label preserves both the model's prediction and the human's correction — and the delta becomes the next training signal.

KHILADIPRO ANNOTATOR pred_* / man_* / edited 6 sport-specific surfaces RAW BROADCAST CLIP unlabeled video MODEL INFERENCE TrackNet · YOLO · TFLite predicts → pred_* HUMAN CORRECTION corrects → man_*, edited=true RETRAINING CYCLE delta → training data annotation_score signal — THE FLYWHEEL —
Models predict → annotators correct → corrections become the next training cycle's signal. The platform's value isn't the labels it produces — it's the rate at which the models improve because of those labels.
03 / Measured Outcome

What the flywheel actually moved.

Sample model improvement through multiple retraining iterations driven entirely by annotator-produced training data. Numbers reflect the shuttle tracker (TrackNetV5) across the platform's lifetime to date.

Accuracy
80→90+%
+10 percentage points through model-in-the-loop retraining.
Median Pixel Error
−70+%
Localization error reduced by more than 70% from baseline.
Detection Rate
+15%
Frame-level detection lift driven by harder corrected training data.

These aren't model-design numbers. They're infrastructure-driven numbers — the same model architecture, retrained on data the annotation platform produced over multiple cycles. The flywheel's design is what made the improvement compound rather than plateau.

04 / The Six Surfaces

Six tools. One editor backbone.

Each tool ships with its own label schema, keyboard model, and sport-specific physics constraints — but they all share the same offline-first edit cache, model-in-the-loop schema, and retraining-signal infrastructure. Different stages of the flywheel; same underlying mechanism.

— 01
Shuttle Tracker · TrackNet-in-the-loop
Mature · Production
The job. Annotate the 2D position of a badminton shuttlecock in every frame of a rally, classify each landing as near/far court, and tag each line call as in/out/unclear.

The hard part. Shuttles are small (often <8 px in broadcast video), motion-blurred during smashes (>300 km/h effective velocities at the racket), and occluded by the net every few seconds.

How I built it. TrackNetV5 (and a halved-channel TrackNetV5Lite for fast iteration) pre-fills the trajectory. R = release, L = landing, C = contact, O = occlude. Shift+←/→ jumps to the next/previous frame the model actually detected something on — annotators only stop on frames that need attention. Landing classification and line-call tag are stored alongside the point, not derived after the fact.
Model
TrackNetV5 · INT8
Size
0.29 MB
Speed (Apple CPU)
69.5 FPS
Detection Rate
90.08%
Accuracy
90.90%
Median Px Error
3.67 px
Drives both tools. The same TrackNetV5 model powers the manual shuttle annotator AND the orchestrated auto-shuttle workflow — single model, two consumption modes.
— 02
Cricket Ball Tracker · dual stumps
In-Loop · High-Recall Starter
The job. Per-frame ball position across a delivery, plus per-event tags for release, landing (pitching point), and contact, plus two stumps bounding boxes — bowler's end and batter's end.

Why two stumps. Almost every downstream cricket metric (line, length, deviation, swing) is computed in a coordinate system anchored on the stumps at both ends. Annotating only one set means we can't recover the 3D bowling axis. So the schema enforces two: predBowl, predBat, manBowl, manBat.

Keyboard model built for speed. R / L / C for release / landing / contact; B / Shift+B for bowler stumps corners; N / Shift+N for batter stumps; full Cmd+Z / Cmd+Shift+Z undo-redo bolted onto every surface.
Model
TFLite FP16
Size
3.41 MB
Speed (CPU)
16.5 FPS
Per-Frame Recall
96.2%
Median Px Error
7.57 px
Stumps Accuracy
99% (sub-pixel)
Recall-optimized by design. Built as a high-recall localization layer in the flywheel. False positives are filtered downstream; landing/release/contact frames are manually marked — ensuring the next training cycle's data is event-precise. This is the model the flywheel will improve next.
— 03
Cricket Bat Tracker · 4-point quadrilateral
Strong · In-Loop
The job. Annotate four keypoints per frame defining the cricket bat as a quadrilateral — head-top, head-bottom, barrel-mid, barrel-bottom — plus a contact flag for the impact frame.

The hard part. The bat is rigid but rotates fast (a cover drive sweeps ~270° in ~150 ms) and self-occludes the bottom corners during the follow-through. Single-bbox detectors give you nothing useful — you need oriented geometry to compute shot direction, swing path, and contact angle.

How the UI handles 4 keypoints without becoming a mode-switching nightmare. Numeric keys 1 / 2 / 3 / 4 cycle the active keypoint — no mode pickers, no dropdowns. Active keypoint is color-coded (red, orange, cyan, purple). Dashed lines = predictions, solid = manual edits — the visual contract makes it instantly obvious where the model is confident and where the human took over.
Model
YOLOv8n-pose
Size
6.58 MB
Params
3.08M
Speed (CPU)
18.5 FPS
Frame Detection
94.3%
Per-Corner Median
1 px
Complete-quadrilateral guarantee. Across 5,436 frames, every detection produces all 4 keypoints above threshold — no partial geometries. Critical for downstream shot-direction and swing-path recovery, which can't consume 3-of-4 keypoint outputs. Mean error 2 px, median per corner 1 px — at the ≤2 px design target.
— 04
Badminton Court Keypointer · 10-point hybrid
Strong · Validation Pending
The job. Annotate 10 court keypoints — 6 service-line points + 4 singles corners — for every frame where the camera moves (broadcast pans, handheld, drone footage).

The architectural insight. Not all keypoints are equal. The 6 service-line points are visually distinctive and detectable per-frame. The 4 singles corners are derivable from court geometry once the service lines are locked. So the YOLO keypoint detector is trained on the 6 service points only — and the 4 corners are propagated via homography. Detection effort goes where the signal is; geometry handles the rest.

The annotator reflects this hybrid. Numeric keys 0–9 cycle through the 10 keypoints. Each has independent visibility flags — courts go partially off-screen during broadcast cuts and the model has to know which points are occluded vs. off-frame. Two annotation flows supported: label-first (pick a keypoint, then click) and click-first (click, then assign) — different annotators converged on different rhythms.
Model
YOLOv8 pose · .pt
Size
47.6 MB · 23.5M
Input
640×640
Speed (MPS)
44.0 FPS
Detection Rate (clean)
100%
Homography Residual
2.61 px / kpt
Honest framing. The 100% detection rate is on clean, undistorted broadcast-style footage — the number drops on harder material (occlusion, players standing on lines, motion blur, oblique angles). Production mAP50 is pending — needs a labeled validation set, which the annotator itself will produce. Failure mode flagged for next training pass: the long-service-centre (LSC) keypoint shows ~2× the residual of other points and is the most likely source of derived-corner geometry drift.
— 05
Auto Shuttle Workflow · end-to-end orchestration
Mature · Orchestrated
The job. Take a raw badminton clip and produce a finalized annotation — trajectory + match-type classification + IN/OUT call + near/far landing — with the human in the loop only on ambiguous frames.

How it composes.
(1) TrackNet infers the shuttle trajectory.
(2) YOLO court keypointer infers the 10 court points in parallel — soft-fail, so the landing call degrades gracefully if court detection misses.
(3) Court-aware match-type classifier uses the inferred court geometry to decide singles vs. doubles.
(4) Landing-call task projects the trajectory into court coordinates and decides IN/OUT + near/far.
(5) Annotator only opens the clip if the orchestrator flags low confidence on any stage.

Why this matters. The five other tools produce training data. This one is what makes them pay off — the inference pipeline turning a raw clip into structured insight automatically, with the annotator as escalation, not as bottleneck.
Human-as-escalation, not as labour. The auto-shuttle workflow inverts the usual annotation economy: the model labels the clip first; the human only intervenes on flagged-confidence frames. This is what compounds the flywheel — the better the models get, the less human time per clip is needed, the more clips get processed per week, the more training data flows in.
— 06
Generic Editor · the test harness
Internal · Iteration Tool
A sport-agnostic single-point editor used to test new model checkpoints against local video files before they touch the production sport-specific surfaces. Same label schema as the shuttle tool, no sport-specific constraints, supports local file mode — the CV engineer's playground for evaluating a checkpoint without going through the full production deployment cycle.
05 / Architecture

Four decisions worth defending.

The platform-level choices that make six different sport surfaces coexist on one editor backbone without becoming an unmaintainable mess.

— 01

Optimistic offline-first edits

All edits write to IndexedDB with a 500ms debounce, then sync to the server via versioned patch ops with conflict detection on base_version. Two annotators can edit the same clip without clobbering each other. A flaky wifi connection doesn't lose 30 minutes of work.

— 02

Model-in-the-loop schema

Every label carries both a pred_* field (model output) AND a man_* field (human correction), plus an edited flag. The annotation isn't a replacement for the prediction — it's a measured correction of it. Models keep learning from the delta.

— 03

Sport-aware physics constraints

Each tool's frame schema encodes the events the sport actually cares about — contact, landing, release, rest for cricket; landing_area (near/far) and line_call (in/out/unclear) for badminton; det_conf + 4-point quadrilaterals for the bat. The schema rejects physically-impossible labels before the human sees them.

— 04

Retryable uploads

Exponential-backoff XHR PUT (1s → 2s → 4s) with progress callbacks and a 10-minute timeout. The retry budget exists because annotators work on real-world wifi, not labs — and losing a half-hour of corrected labels because of a network blip is unacceptable when those labels are the retraining signal.

06 / Stack

What's under it.

— Frontend
Next.js 15 · React 19 · TypeScript 5 · Tailwind CSS · IndexedDB (offline cache) · XHR with progress + retry
— Orchestration
Flyte (workflow orchestration) · Bifrost (job dispatcher, Go/Twirp) · GCS (artifact store) · MongoDB (job state)
— Models
TrackNetV5 / TrackNetV5Lite (shuttle) · YOLOv8 keypoint (court · mAP50 ≥ 0.80 quality gate) · TFLite ball + landing detector · Custom 4-point bat detector (YOLOv8n-pose)
— Role
Sole engineer · schema design · editor UX · service layer · model integration · Flyte workflow wiring
07 / What's Next

What the flywheel is about to move.

The platform compounds. Every annotation session improves the next training cycle. Here's what the next cycle is targeting.

— A note on detail
This page describes the system's design and measured outcomes. Internal repository paths, code structure, file names, deployment infrastructure, and specific proprietary algorithms are not shown — this is production work for KhiladiPro, and the engineering substance is what's discoverable here without exposing IP.