Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -15,8 +15,8 @@ model.to('cuda' if torch.cuda.is_available() else 'cpu') # Use GPU if available
|
|
15 |
# Constants for LBW decision and video processing
|
16 |
STUMPS_WIDTH = 0.2286 # meters (width of stumps)
|
17 |
BALL_DIAMETER = 0.073 # meters (approx. cricket ball diameter)
|
18 |
-
FRAME_RATE =
|
19 |
-
SLOW_MOTION_FACTOR =
|
20 |
CONF_THRESHOLD = 0.2 # Confidence threshold
|
21 |
IMPACT_ZONE_Y = 0.85 # Fraction of frame height where impact is likely
|
22 |
IMPACT_DELTA_Y = 50 # Pixels for detecting sudden y-position change
|
|
|
15 |
# Constants for LBW decision and video processing
|
16 |
STUMPS_WIDTH = 0.2286 # meters (width of stumps)
|
17 |
BALL_DIAMETER = 0.073 # meters (approx. cricket ball diameter)
|
18 |
+
FRAME_RATE = 20 # Input video frame rate (adjust if known)
|
19 |
+
SLOW_MOTION_FACTOR = 3 # For very slow motion (6x slower)
|
20 |
CONF_THRESHOLD = 0.2 # Confidence threshold
|
21 |
IMPACT_ZONE_Y = 0.85 # Fraction of frame height where impact is likely
|
22 |
IMPACT_DELTA_Y = 50 # Pixels for detecting sudden y-position change
|