A computer vision package to recognize and assess different cricket shots and bowling videos.
Project description
Cricket
This is a package which can be used for assessing videos of bowling and batting
How To Use
Batting
Specific Shot
from cricket.batting import straight_drive
decision = straight_drive.classify_entire_video("video_path")
There are various shots like
- Cover drive
- Pull shot
- Sweep
- Reverse sweep
- Hook shot
- Defense
This is the implementation of straight drive. It will also return if it was a:
- Good shot
- Bad shot
Overall
from cricket.batting import overall_shot_detection
classifier = overall_shot_detection.CricketShotClassifier()
classifier.classify_entire_video("video_path")
This classifier class is compatible with the following shots:
- Straight Drive
- Cover Drive
- Sweep
- Defence
- Reverse Sweep
- Pull Shot
- Hook Shot
This will also return if it was a:
- Good Shot
- Bad Shot
Balling
Specific Type
from cricket.balling import fast
import cricket.utils as utils
ball_colour_range = utils.color_ranges["white"]
decision = fast.classify_entire_video("video_path", ball_colour_range)
This method is compatible with:
- Fast ball
- Slow ball
- Yorker
- Spin
This was an implementation of a fast ball. It will also tell if it was a:
- Good Delivery
- Bad Delivery
Overall
from cricket.balling.overall_bowl_detection import CricketBallAnalyzer
import cricket.utils as utils
ball_colour_range = utils.color_ranges["white"]
analyser = CricketBallAnalyzer("video_path", ball_colour_range[0], ball_colour_range[1], 22)
decision = analyser.analyze_video()
This classifier class is compatible with:
- Fast Ball
- Slow ball
- Yorker
- Spin
Combined
from cricket.combined import classify_overall
import cricket.utils as utils
ball_colour = utils.color_ranges["white"]
decision = classify_overall("video_path", ball_colour, 22)
This will run both the classes given above and will return a dictionary. First key will be of bowling and second key will be of batting
Note: For ease of use you can import like this and it would import all things for implementation from both the subpackages
from cricket import *
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cricket_tannmay-0.1.5.tar.gz.
File metadata
- Download URL: cricket_tannmay-0.1.5.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e246e3b55328650ebd19af9d5508da231c4d6b0c53d7833ee88fb9da6d9dfaeb
|
|
| MD5 |
d075ffed25785ccfec2a3b1f1119d5ad
|
|
| BLAKE2b-256 |
65a7073a54d8f7394db470b72b8ff6ad396c811abff703a3c18a2d33375fb33b
|
File details
Details for the file cricket_tannmay-0.1.5-py3-none-any.whl.
File metadata
- Download URL: cricket_tannmay-0.1.5-py3-none-any.whl
- Upload date:
- Size: 20.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2bae588c74eed3f8d8e075d46c2770875a2cf76f92254e5127ae5a9dcd0adda4
|
|
| MD5 |
090e9f665e4660f2562ecd42289993bb
|
|
| BLAKE2b-256 |
a2de1b7cfd0525b2cb94445b1f41a4b11ca773fd23a3f6cf138f7fa57039abd9
|