Spaces:
Runtime error
Runtime error
changing code for video generatio
Browse files- .gitignore +1 -1
- app.py +5 -3
- output.mp4 +0 -0
.gitignore
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
# Added
|
2 |
tmp/
|
3 |
-
|
4 |
# Byte-compiled / optimized / DLL files
|
5 |
__pycache__/
|
6 |
*.py[cod]
|
|
|
1 |
# Added
|
2 |
tmp/
|
3 |
+
*.mp4
|
4 |
# Byte-compiled / optimized / DLL files
|
5 |
__pycache__/
|
6 |
*.py[cod]
|
app.py
CHANGED
@@ -169,8 +169,8 @@ def process_video(input_video, out_fps = 'auto', skip_frames = 7):
|
|
169 |
prediction_frame = cv2.cvtColor(display_frame, cv2.COLOR_BGR2RGB)
|
170 |
|
171 |
|
172 |
-
#
|
173 |
-
video.write(cv2.cvtColor(frame, cv2.COLOR_RGB2BGR))
|
174 |
|
175 |
if cnt*skip_frames %2==0 and top_pred['shark_sighted']:
|
176 |
prediction_frame = cv2.resize(prediction_frame, (int(width), int(height)))
|
@@ -178,7 +178,9 @@ def process_video(input_video, out_fps = 'auto', skip_frames = 7):
|
|
178 |
|
179 |
if top_pred['shark_sighted']:
|
180 |
frame = draw_cockpit(frame, top_pred,cnt*skip_frames)
|
181 |
-
|
|
|
|
|
182 |
|
183 |
|
184 |
pred_dashbord = prediction_dashboard(top_pred = top_pred)
|
|
|
169 |
prediction_frame = cv2.cvtColor(display_frame, cv2.COLOR_BGR2RGB)
|
170 |
|
171 |
|
172 |
+
#
|
173 |
+
#video.write(cv2.cvtColor(frame, cv2.COLOR_RGB2BGR))
|
174 |
|
175 |
if cnt*skip_frames %2==0 and top_pred['shark_sighted']:
|
176 |
prediction_frame = cv2.resize(prediction_frame, (int(width), int(height)))
|
|
|
178 |
|
179 |
if top_pred['shark_sighted']:
|
180 |
frame = draw_cockpit(frame, top_pred,cnt*skip_frames)
|
181 |
+
|
182 |
+
frame = cv2.resize(frame, (int(width), int(height)))
|
183 |
+
video.write(cv2.cvtColor(frame, cv2.COLOR_RGB2BGR))
|
184 |
|
185 |
|
186 |
pred_dashbord = prediction_dashboard(top_pred = top_pred)
|
output.mp4
DELETED
Binary file (262 kB)
|
|