YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
π Cricket Rule-Breaking Detector β Front-Foot No-Ball (Google Colab)
One-line story: Fatima Noor loves cricket and built this Colab-only MVP to highlight front-foot no-balls on short videos with clear on-frame overlays.
Overview
This repository contains a Google Colab workflow to:
- Detect the bowlerβs front foot near the popping crease.
- Produce an annotated MP4 with boxes/labels.
- Optionally add crease calibration and a LEGAL / NO-BALL verdict.
What I Used (Project Inputs)
- Model weights:
best.pt(YOLOv8n fine-tuned for front-foot context). - Videos: Short delivery clips sourced from YouTube (educational/research use). Clips were trimmed to ~6β12s where the front foot & crease are clearly visible.
- Training data: A small YOLO-format dataset focused on front foot near popping crease (curated and managed via Roboflow).
How I Trained the Model (Roboflow)
- Create a Roboflow project and set the task to object detection.
- Upload images (replay frames showing bowlerβs front foot near the crease).
- Label consistently:
- Class:
front_foot(tight bounding box). - Keep visible reference to the popping crease for later calibration (not strictly required in labels).
- Class:
- Generate dataset in YOLOv8 (Ultralytics) format (train/val split suggested: 70/20/10).
- Export/download the dataset and fine-tune YOLOv8n in Colab until validation improves.
- Save the checkpoint with highest validation score as
best.pt.
Notes: Small, high-quality labels beat large, noisy datasets. Start with ~30β50 crisp images from your camera style and iterate.
How I Ran Inference (Using best.pt)
- Open the inference notebook
notebooks/02_infer_video.ipynbin Google Colab and enable GPU. - Upload:
- The trained
best.pt. - A short MP4 clip (downloaded from YouTube; trimmed to one delivery).
- The trained
- Run the notebook cells in order. The pipeline:
- Loads the model and the video.
- Processes frames and draws front-foot overlays.
- Exports
outputs/pred.mp4as the annotated result.
- (Optional) Enable Calibration and Rule Decision sections in the notebook to display a LEGAL / NO-BALL verdict (toe vs crease with a small tolerance).
Results (Placeholders)
πΈ
Requirements
- Google Colab with GPU runtime.
- Short delivery videos (6β12s) where the front foot & crease are visible.
best.pt(if running inference only) or a small YOLO-format dataset (if you want to train).
Best Practices
- Use replay-style close-ups; keep clips short and steady.
- For training, prioritize tight, consistent labels over quantity.
- Calibrate once per camera angle for robust LEGAL / NO-BALL decisions.
Limitations
- Sensitive to camera angle, blur, and occlusions.
- Performance depends on data quality and representativeness.
- MVP scope is front-foot context; other rules need additional modules.
- For education/training; not an official officiating system.
License
MIT License β Use responsibly; respect content rights when sourcing videos.
Credits
Ultralytics YOLO, OpenCV, Roboflow, and the open tooling community.
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support