turhancan97 commited on
Commit
36cb64b
1 Parent(s): 77abadc

video orientation

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -194,14 +194,14 @@ def show_preds_video(video_path):
194
  results = outputs[0].cpu().numpy()
195
  for i, det in enumerate(results.boxes.xyxy):
196
  cv2.rectangle(
197
- frame_copy,
198
  (int(det[0]), int(det[1])),
199
  (int(det[2]), int(det[3])),
200
  color=(0, 0, 255),
201
  thickness=2,
202
  lineType=cv2.LINE_AA
203
  )
204
- yield cv2.cvtColor(frame_copy, cv2.COLOR_BGR2RGB)
205
 
206
  inputs_video = [
207
  gr.components.Video(type="filepath", label="Input Video"),
 
194
  results = outputs[0].cpu().numpy()
195
  for i, det in enumerate(results.boxes.xyxy):
196
  cv2.rectangle(
197
+ img,
198
  (int(det[0]), int(det[1])),
199
  (int(det[2]), int(det[3])),
200
  color=(0, 0, 255),
201
  thickness=2,
202
  lineType=cv2.LINE_AA
203
  )
204
+ yield cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
205
 
206
  inputs_video = [
207
  gr.components.Video(type="filepath", label="Input Video"),