Spaces:
Runtime error
Runtime error
Ivan Felipe Rodriguez
commited on
Commit
•
c678990
1
Parent(s):
f1635ae
danger level
Browse files
app.py
CHANGED
@@ -228,9 +228,9 @@ def process_video(input_video, out_fps = 'auto', skip_frames = 12):
|
|
228 |
last_5_human_detected[drawn_count % 5] = int(top_pred['human_n'] > 0)
|
229 |
last_5_dangerous_dist[drawn_count % 5] = int(top_pred['dangerous_dist'] > 0)
|
230 |
|
231 |
-
top_pred['shark_sighted'] = int(np.sum(last_5_shark_detected) >
|
232 |
-
top_pred['human_sighted'] = int(np.sum(last_5_human_detected) >
|
233 |
-
top_pred['dangerous_dist_confirmed'] = int(np.sum(last_5_dangerous_dist) >
|
234 |
|
235 |
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
|
236 |
prediction_frame = cv2.cvtColor(display_frame, cv2.COLOR_BGR2RGB)
|
|
|
228 |
last_5_human_detected[drawn_count % 5] = int(top_pred['human_n'] > 0)
|
229 |
last_5_dangerous_dist[drawn_count % 5] = int(top_pred['dangerous_dist'] > 0)
|
230 |
|
231 |
+
top_pred['shark_sighted'] = int(np.sum(last_5_shark_detected) > 2)
|
232 |
+
top_pred['human_sighted'] = int(np.sum(last_5_human_detected) > 2)
|
233 |
+
top_pred['dangerous_dist_confirmed'] = int(np.sum(last_5_dangerous_dist) > 2)
|
234 |
|
235 |
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
|
236 |
prediction_frame = cv2.cvtColor(display_frame, cv2.COLOR_BGR2RGB)
|