The LBW (Leg Before Wicket) Review System is a computer vision-based project that analyzes cricket match videos to determine if a batsman is out or not based on LBW rules.
This system utilizes YOLOv8 for object detection and Flask for the backend to process cricket match videos.
✅ Video Upload – Upload cricket match videos for analysis.
✅ Object Detection – Detects ball, batsman, stumps, and pitch using YOLOv8.
✅ LBW Decision System – Applies cricket LBW rules to determine if the batsman is out.
✅ User Interface – Simple web-based UI for easy interaction.
- Python 3.8+
- pip (Python package manager)
- Git installed
git clone https://github.com/your-username/LBW-Review-System.git
cd LBW-Review-Systempip install -r backend/requirements.txt- Download
yolov8n.ptfrom the Ultralytics Repository. - Place it in the
models/folder.
- Store training data inside
dataset/folder. - Annotate using LabelImg (GitHub).
- Modify
dataset/dataset.yamlaccordingly.
python backend/train.pypython backend/app.py- Open
frontend/index.htmlin a browser. - Upload a cricket match video and get LBW results.
1️⃣ Upload a cricket match video via the web interface.
2️⃣ System processes the video using YOLOv8 for object detection.
3️⃣ LBW logic is applied to detect if the batsman is Out or Not Out.
4️⃣ Results are displayed on the web interface.
dataset/
├── images/
│ ├── train/ # Training images
│ └── val/ # Validation images
├── labels/
│ ├── train/ # YOLO format labels for training
│ └── val/ # YOLO format labels for validation
└── dataset.yaml # Dataset configuration
- Use LabelImg to annotate images.
- Save annotations in YOLO format.
1️⃣ Ensure dataset is properly structured.
2️⃣ Train model using:
python backend/train.py3️⃣ Trained model is saved at runs/detect/train/weights/best.pt.
4️⃣ Move best.pt to the models/ folder for inference.
This project is licensed under the MIT License - see the LICENSE file for details.
