Maddy21 commited on
Commit
96ebbe7
·
1 Parent(s): 75ee2ec
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -56,12 +56,14 @@ def predict_video(video_path):
56
  break
57
 
58
  frame_count += 1
 
59
  image = Image.fromarray(cv2.cvtColor(frame, cv2.COLOR_BGR2RGB))
60
  image = transform(image).unsqueeze(0).to(device)
61
 
62
  with torch.no_grad():
63
  outputs = model(image)
64
  _, predicted = torch.max(outputs, 1)
 
65
 
66
  if predicted.item() == 0:
67
  real_count += 1
 
56
  break
57
 
58
  frame_count += 1
59
+ print(frame_count)
60
  image = Image.fromarray(cv2.cvtColor(frame, cv2.COLOR_BGR2RGB))
61
  image = transform(image).unsqueeze(0).to(device)
62
 
63
  with torch.no_grad():
64
  outputs = model(image)
65
  _, predicted = torch.max(outputs, 1)
66
+ print(predicted)
67
 
68
  if predicted.item() == 0:
69
  real_count += 1