DSatishchandra commited on
Commit
b79fad4
·
verified ·
1 Parent(s): 64ad5da

Update gully_drs_core/ball_detection.py

Browse files
Files changed (1) hide show
  1. gully_drs_core/ball_detection.py +7 -0
gully_drs_core/ball_detection.py CHANGED
@@ -6,6 +6,10 @@ import gradio as gr
6
  from gully_drs_core import video_utils, replay_utils, model_utils
7
 
8
  def process_lbw_detection(uploaded_video_filepath, pitch_position):
 
 
 
 
9
  # Load YOLOv5n model
10
  model = model_utils.load_yolo_model()
11
 
@@ -23,6 +27,9 @@ def process_lbw_detection(uploaded_video_filepath, pitch_position):
23
  frame_height
24
  )
25
 
 
 
 
26
  # Track frames and ball path
27
  ball_path = []
28
  frames = []
 
6
  from gully_drs_core import video_utils, replay_utils, model_utils
7
 
8
  def process_lbw_detection(uploaded_video_filepath, pitch_position):
9
+ if pitch_position is None:
10
+ pitch_position = 50 # Set to a default value if None (e.g., 50%)
11
+
12
+ # Process video and detect LBW
13
  # Load YOLOv5n model
14
  model = model_utils.load_yolo_model()
15
 
 
27
  frame_height
28
  )
29
 
30
+ # Continue with your ball detection and LBW processing logic...
31
+
32
+
33
  # Track frames and ball path
34
  ball_path = []
35
  frames = []