Skip to content

Cricket is often described as a contest between bat and ball, and batting is considered one of its prime disciplines. While batting a batter tries to hit the ball with a different variety of shots to guide the ball in any specific direction of their wish. The types of shots include cover drive, straight drive, pull shot, reverse sweep, and many …

Notifications You must be signed in to change notification settings

gtmray/cricket-shots

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cricket-shots

Cricket 🏏 is often described as a contest between bat and ball, and batting is considered one of its prime disciplines. While batting a batter tries to hit the ball with a different variety of shots to guide the ball in any specific direction of their wish. The types of shots include cover drive, straight drive, pull shot, reverse sweep, and many more. It is tedious task to classify shots manually and provide the insights for the batsman. Our goal is to classify the shot using AI and to provide an analysis of how well someone plays a particular shot. This can be achieved by collecting the required image data, extracting features, feeding to the machine learning or deep learning algorithms, and generating the classifier output. We have implemented the model using SVM which works better with less data.

TO RUN THIS PROJECT

  1. Clone this repo:
    git clone https://github.com/gtmray/cricket-shots.git

  2. Create virtualenv and activate:
    virtualenv env
    .\env\Scripts\activate

  3. Install dependencies:
    pip install -r requirements.txt

  4. Bat Detection:
    py predict_bat.py IMAGE_PATH

  5. Shots Classification:
    py predict_shot.py model/shot_classification.pkl IMAGE_PATH

  6. For running API:
    uvicorn fast_api:app
    or py -m uvicorn fast_api:app

  7. Predict shots and efficiency:
    py shots_eff.py IMAGE_PATH

Output

Mobile Application Demo

About

Cricket is often described as a contest between bat and ball, and batting is considered one of its prime disciplines. While batting a batter tries to hit the ball with a different variety of shots to guide the ball in any specific direction of their wish. The types of shots include cover drive, straight drive, pull shot, reverse sweep, and many …

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •