tree3po commited on
Commit
718ddba
·
verified ·
1 Parent(s): 54b6c01

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -27,7 +27,7 @@ def draw_box(image,det):
27
  end_point = ((int(ea[2]),int(ea[3])))
28
  color = (255, 0, 0)
29
  thickness = 2
30
- label = f'{det.data[i]}'
31
  font = cv2.FONT_HERSHEY_SIMPLEX # Choose a font
32
  font_scale = 1
33
  color = (0, 0, 255) # Blue color
@@ -64,7 +64,7 @@ def stream_object_detection(video):
64
  output_video.write(frame)
65
  batch = []
66
  output_video.release()
67
- yield output_video_name
68
  output_video_name = f"output_{uuid.uuid4()}.mp4"
69
  output_video = cv2.VideoWriter(output_video_name, video_codec, desired_fps, (width, height)) # type: ignore
70
  iterating, frame = cap.read()
 
27
  end_point = ((int(ea[2]),int(ea[3])))
28
  color = (255, 0, 0)
29
  thickness = 2
30
+ label = f'{det.data}'
31
  font = cv2.FONT_HERSHEY_SIMPLEX # Choose a font
32
  font_scale = 1
33
  color = (0, 0, 255) # Blue color
 
64
  output_video.write(frame)
65
  batch = []
66
  output_video.release()
67
+ yield output_video_name,detections
68
  output_video_name = f"output_{uuid.uuid4()}.mp4"
69
  output_video = cv2.VideoWriter(output_video_name, video_codec, desired_fps, (width, height)) # type: ignore
70
  iterating, frame = cap.read()