turhancan97 commited on
Commit
1dc7f22
·
1 Parent(s): 36cb64b

video issue fixed

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -169,7 +169,7 @@ def show_preds_video(video_path):
169
  height=img_res_toshow.shape[0]
170
  width=img_res_toshow.shape[1]
171
  dim=(width,height)
172
- outputs = model.predict(source=frame)
173
  for object in range(len(outputs[0].masks.masks)):
174
  #obtain BW image
175
  bw=(outputs[0].masks.masks[object].cpu().numpy() * 255).astype("uint8")
@@ -197,7 +197,7 @@ def show_preds_video(video_path):
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
  )
 
169
  height=img_res_toshow.shape[0]
170
  width=img_res_toshow.shape[1]
171
  dim=(width,height)
172
+ outputs = model.predict(source=img_res_toshow)
173
  for object in range(len(outputs[0].masks.masks)):
174
  #obtain BW image
175
  bw=(outputs[0].masks.masks[object].cpu().numpy() * 255).astype("uint8")
 
197
  img,
198
  (int(det[0]), int(det[1])),
199
  (int(det[2]), int(det[3])),
200
+ color=(255, 0, 0),
201
  thickness=2,
202
  lineType=cv2.LINE_AA
203
  )