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)

  1. Create a Roboflow project and set the task to object detection.
  2. Upload images (replay frames showing bowler’s front foot near the crease).
  3. Label consistently:
    • Class: front_foot (tight bounding box).
    • Keep visible reference to the popping crease for later calibration (not strictly required in labels).
  4. Generate dataset in YOLOv8 (Ultralytics) format (train/val split suggested: 70/20/10).
  5. Export/download the dataset and fine-tune YOLOv8n in Colab until validation improves.
  6. 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)

  1. Open the inference notebook notebooks/02_infer_video.ipynb in Google Colab and enable GPU.
  2. Upload:
    • The trained best.pt.
    • A short MP4 clip (downloaded from YouTube; trimmed to one delivery).
  3. Run the notebook cells in order. The pipeline:
    • Loads the model and the video.
    • Processes frames and draws front-foot overlays.
    • Exports outputs/pred.mp4 as the annotated result.
  4. (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)

πŸ“Έ

image

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.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support