Work · KhiladiPro · Event Detection

Audio Hit/Miss.

Bat-ball contact event detection from audio, not video. The only event-detection method in the production stack that survives noisy training environments where visual methods fail — nets, occlusion, motion blur, partial bat-on-ball contact. ~85% production accuracy, fine-tune peaked at 86.36%, built in a 9-day arc with a memorable annotation-export bug in the middle.

Production Accuracy
~85%
Fine-tune Peak
86.36%
Target Beat By
+6.36 pp
Modality
Audio-only
01 / The Problem

Visual breaks where the user actually trains.

Most amateur cricket and badminton happens in nets. Indoor nets, outdoor nets, mixed-lighting nets, single-camera handheld phone-on-tripod nets. This is where the user shoots their training video — and this is exactly where the visual-only event-detection pipeline starts to fall apart.

In broadcast footage, the ball-on-bat contact frame is unambiguous: clean light, stable camera, 4K resolution, the ball is always visible. In nets footage, the same event is partially occluded by the net itself, partially clipped by the camera framing, partially blurred by 30 FPS motion, partially happening behind the batter's body. The visual pipeline reports either no detection (model didn't see it) or false detection (model saw the ball pass and assumed contact). Either way: analytics downstream gets corrupted.

The audio modality is invariant to all of this. The contact sound is the contact sound — same acoustic signature regardless of camera angle, lighting, net density, or motion blur. If we can train a model to classify the bat-ball contact sound vs ambient noise, we have an event detector that works in the same place the user actually generates the footage.

02 / The Modality Choice

Why audio, not better video.

The alternative would have been investing more in visual robustness — better occlusion handling, motion-blur compensation, multi-frame temporal smoothing. We chose audio. Here's the comparison that drove the decision.

Visual

Visual contact detection · what breaks

The visual pipeline that powers shuttle tracking and cricket ball tracking also tries to detect bat-ball contact. In broadcast footage it's fine. In nets footage it isn't.

  • Net mesh partially occludes the contact frame
  • 30 FPS motion blur smears the ball at contact moment
  • Single-angle phone captures lose contact behind the batter
  • Mixed indoor lighting creates inconsistent ball-on-bat texture
  • Same model that ships 93% on broadcast badminton drops to unusable in nets
  • Improving any of these is months of training data, not weeks
Audio

Audio contact detection · what survives

The acoustic signature of bat-ball contact is modality-invariant. The microphone hears the contact sound whether or not the camera saw it.

  • Net mesh doesn't block sound
  • Frame-rate irrelevant — audio sample rate is 44.1 kHz
  • Camera angle doesn't matter — phone mic is omnidirectional
  • Lighting irrelevant
  • Same model serves broadcast AND nets footage
  • 106 labelled samples sufficient for first viable model
— The Categorical Claim
The only event-detection method in the production stack that survives noisy training environments where visual-only methods fail.
03 / The Iteration

68% to 86.36% in 23 hours.

The build cycle spanned 9 days end-to-end (Jun 19–27, 2025), but the actual accuracy jump happened in a single overnight cycle — after an annotation-export bug was identified and fixed.

100% 90% 80% 70% 60% TARGET · 80% 68% 86.36% ~85% JUN 26 First Training 106 samples · bug found JUN 27 Fine-tune Peak Bug fixed · +18.36 pp SEP 2025 Production (expanded) Larger dataset · stable ALL LABELS = MISS JSON EXPORT BUG Accuracy iteration · Jun 19 – Sep 2025
First training run on 106 samples hit 68% — below target, and the LabelStudio JSON export bug had just been resolved. After fine-tuning, the next cycle hit 86.36% the following morning. The September 2025 production deployment on an expanded dataset settled at ~85%, stable.
04 / The Bug

The annotation that looked correct in the UI.

— Linear ticket AI-68 · June 26, 2025 · 09:34 UTC

I have annotated the clips twice, but when exporting in JSON format, every annotation is marked as miss.

yash.v@khiladipro.com · Linear AI-68 comment

This is the kind of bug that doesn't break anything visibly. The LabelStudio UI showed both hit and miss annotations correctly. The training pipeline accepted the exported JSON without error. But the exported labels were corrupted — every annotation, whether marked hit or miss in the UI, exported as "miss." A model trained on that data would learn to predict "miss" every time, regardless of the actual audio.

The bug was in the LabelStudio JSON export configuration — a templating issue where the hit-label keyword wasn't being written to the exported file. The fix took less than an hour once identified. Finding it took longer.

Why this matters for the portfolio: the lesson isn't "labelling tools have bugs." The lesson is silent data corruption is the most dangerous bug class in ML pipelines. If the bug had survived undetected, every downstream training cycle would have been chasing model improvements against corrupted ground truth — a model that "improves" without ever working. The willingness to annotate twice and notice the discrepancy, dig into the export pipeline, and find the real story is what unlocked the 86.36% the next morning. Most ML projects die quietly to silent data corruption. This one didn't.

By 13:35 UTC the same day, the training pipeline was re-run on corrected labels: Total samples loaded: 106, Model Accuracy: 0.68. By 13:37 UTC: "The accuracy is 68% I will work on it further to improve the accuracy." By 08:42 UTC the next morning (Jun 27): "Improved Model Accuracy: 86.36%".

05 / Timeline

Nine days. Six events.

The full sequence from annotation pipeline setup to production deployment. Includes the bug, the fix, the fine-tune peak, and the September dataset expansion that stabilized the model at ~85%.

JUN 19 · 2025Linear AI-21
Annotation pipeline setup · LabelStudio
setup Configured LabelStudio for audio annotation. Designed the annotation schema: hit events vs miss events with timestamp markers. Audio clip preprocessing pipeline — segmenting longer recordings into per-event audio windows. Foundation work, no model yet.
JUN 25 · 2025Annotation
First round of annotations · 106 clips
data Annotated the initial set of 106 audio clips manually — listening to each clip, marking hit vs miss based on the acoustic signature of bat-ball contact. Ground truth dataset ready for first training run.
JUN 26 · 09:34 UTCBug discovery
JSON export bug identified
bug Posted to Linear AI-68: "I have annotated the clips twice, but when exporting in JSON format, every annotation is marked as miss." The LabelStudio UI showed annotations correctly but the export was corrupted. This is the moment that determined the project's trajectory.
JUN 26 · 13:35 UTCFirst training
First training run · 68% accuracy
training "Total samples loaded: 106, Model Accuracy: 0.68". Below the 80% target. Two minutes later: "The accuracy is 68% I will work on it further to improve the accuracy." The bug had been resolved before this run — this 68% is an honest first-cycle baseline on corrected labels, not the corrupted ones.
JUN 27 · 08:42 UTCFine-tune peak
Fine-tune complete · 86.36%
peak "Improved Model Accuracy: 86.36%". Beat the 80% target by 6.36 percentage points. Hyperparameter sweep and fine-tuning on the same 106-sample dataset. The +18.36 pp lift over the first-run baseline came from optimization on the corrected labels, not more data. 23 hours from first-run baseline to fine-tune peak.
SEP 17–19 · 2025Linear AI-236
Dataset expansion · production deployment
production Expanded annotation set with additional audio samples across more environments (broadcast + nets + indoor + outdoor). Re-trained on the larger dataset. Production deployment settled at ~85% accuracy — slightly below the 86.36% peak because the larger dataset has more environmental diversity (harder examples), but more robust to unseen environments. The number you'd actually trust in production.
06 / Results

What gets shipped.

Production Accuracy
~85%
Fine-tune Peak
86.36%
Initial Target
80%
First-Cycle Baseline
68%
Initial Dataset
106 samples
Production Dataset
Expanded · Sep '25
Lift over Baseline
+18.36 pp
Target Beat By
+6.36 pp

The production model serves as the event-detection layer for the KhiladiPro analytics pipeline on training-environment footage. Where visual contact detection drops to unusable, audio detection holds. This is the model that lets KhiladiPro work where the user actually trains — nets, indoor courts, single-camera phone setups — instead of being limited to broadcast-quality footage.

The ~85% production number is the deliberately-honest framing. The fine-tune peak hit 86.36% on the original 106-sample dataset; production on the expanded dataset is slightly lower because the expansion deliberately added harder environments. Reporting the lower number that's more representative of real-world performance is the more credible move than reporting the higher number from a smaller, easier dataset.

07 / Honest Limitations

What's actually in production.

Every system has limitations. Pretending the audio detector is bulletproof would be dishonest — and would set up downstream consumers for failures they couldn't anticipate.

— 01

No per-class breakdown reported

The 85% production accuracy is overall. Hit vs miss class-level accuracy isn't separately reported — if one class is consistently harder than the other (likely miss, since "miss" includes more acoustic variation), the headline number hides it. V2 work would surface the per-class confusion matrix.
— 02

Microphone dependency

The model trains on audio from the same camera-microphone setup that captures the video. Different microphones produce different acoustic signatures. If the user switches phones, the audio characteristics change — model robustness across microphone hardware isn't formally benchmarked.
— 03

Background noise floor

Works in quiet nets. Works in moderately-noisy nets. In very noisy environments — multiple courts active simultaneously, crowd noise, ambient music — the contact signature gets buried. Hard noise threshold beyond which the model degrades is not characterized.
— 04

Single-modality decision boundary

Audio is a binary classifier — hit or miss, no confidence calibration. No ensemble with visual for ambiguous cases. A model that says "I'm 51% confident this is a hit" gets treated the same as "99% confident." V2 should add confidence calibration and visual ensemble for low-confidence cases.
— 05

Cross-sport unproven

Trained and validated on cricket bat-ball contact. Whether the same architecture works on badminton shuttle-racket contact or other sport-specific acoustic events is not yet tested. The categorical claim about "noisy environments" is sport-specific evidence, not general evidence.
— 06

Latency not benchmarked

Production deploys batched (audio clip → label). Real-time / streaming-mode inference latency isn't measured. For analytics this is fine; for in-game overlays or real-time feedback, the latency profile would need to be characterized.
— 07

Held-out methodology not fully formal

The 85% comes from production evaluation but the held-out split methodology — same conditions vs cross-condition splits — isn't as formally documented as the shuttle benchmark's held-out clips + held-out venues structure. Same standard should apply here.
— 08

No IAA on the audio labels

Audio annotation is harder than visual — humans listening to ambiguous "did that bat catch the ball?" sounds disagree at non-trivial rates. Inter-annotator agreement was not formally measured. The model's accuracy ceiling is bounded by labelling noise we haven't characterized.
08 / What's Next

V2 priorities.

— A note on detail
This page describes the categorical claim, the build cycle, the bug story, and the measured results. Specific model architecture, audio feature extraction pipeline, hyperparameter values, and deployment infrastructure are not shown — this is production work for KhiladiPro, and the engineering substance is what's discoverable here without exposing IP.