Spaces:
Runtime error
Runtime error
fixing labels, putting border again
Browse files- app.py +4 -3
- output.mp4 +0 -0
app.py
CHANGED
@@ -131,7 +131,7 @@ def process_video(input_video, out_fps = 'auto', skip_frames = 7):
|
|
131 |
|
132 |
if top_pred['shark_sighted']:
|
133 |
frame = draw_cockpit(frame, top_pred,cnt*skip_frames)
|
134 |
-
video.write(frame)
|
135 |
pred_dashbord = prediction_dashboard(top_pred = top_pred)
|
136 |
#print('sending frame')
|
137 |
print('finalizing frame:',cnt)
|
@@ -147,14 +147,15 @@ def process_video(input_video, out_fps = 'auto', skip_frames = 7):
|
|
147 |
yield None, None, output_path, None
|
148 |
|
149 |
with gr.Blocks(theme=theme) as demo:
|
150 |
-
with gr.Row().style(equal_height=True,height='
|
151 |
input_video = gr.Video(label="Input")
|
152 |
processed_frames = gr.Image(label="Shark Engine")
|
153 |
output_video = gr.Video(label="Output Video")
|
154 |
dashboard = gr.Image(label="Dashboard")
|
155 |
|
156 |
with gr.Row():
|
157 |
-
|
|
|
158 |
|
159 |
with gr.Row():
|
160 |
paths = sorted(pathlib.Path('videos_example/').rglob('*.mp4'))
|
|
|
131 |
|
132 |
if top_pred['shark_sighted']:
|
133 |
frame = draw_cockpit(frame, top_pred,cnt*skip_frames)
|
134 |
+
video.write(cv2.cvtColor(frame, cv2.COLOR_RGB2BGR))
|
135 |
pred_dashbord = prediction_dashboard(top_pred = top_pred)
|
136 |
#print('sending frame')
|
137 |
print('finalizing frame:',cnt)
|
|
|
147 |
yield None, None, output_path, None
|
148 |
|
149 |
with gr.Blocks(theme=theme) as demo:
|
150 |
+
with gr.Row().style(equal_height=True,height='25%'):
|
151 |
input_video = gr.Video(label="Input")
|
152 |
processed_frames = gr.Image(label="Shark Engine")
|
153 |
output_video = gr.Video(label="Output Video")
|
154 |
dashboard = gr.Image(label="Dashboard")
|
155 |
|
156 |
with gr.Row():
|
157 |
+
|
158 |
+
original_frames = gr.Image(label="Original Frame").style( height=650)
|
159 |
|
160 |
with gr.Row():
|
161 |
paths = sorted(pathlib.Path('videos_example/').rglob('*.mp4'))
|
output.mp4
CHANGED
Binary files a/output.mp4 and b/output.mp4 differ
|
|