Spaces:
Running
on
Zero
Running
on
Zero
add mp4 to lfs
Browse files- .gitattributes +1 -0
- app.py +18 -1
.gitattributes
CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
app.py
CHANGED
@@ -43,11 +43,16 @@ performs object segmentation on the image.
|
|
43 |
"""
|
44 |
|
45 |
IMAGE_PROCESSING_EXAMPLES = [
|
46 |
-
[IMAGE_OPEN_VOCABULARY_DETECTION_MODE, "https://media.roboflow.com/notebooks/examples/dog-2.jpeg", 'straw, white napkin, black napkin,
|
47 |
[IMAGE_OPEN_VOCABULARY_DETECTION_MODE, "https://media.roboflow.com/notebooks/examples/dog-3.jpeg", 'tail'],
|
48 |
[IMAGE_CAPTION_GROUNDING_MASKS_MODE, "https://media.roboflow.com/notebooks/examples/dog-2.jpeg", None],
|
49 |
[IMAGE_CAPTION_GROUNDING_MASKS_MODE, "https://media.roboflow.com/notebooks/examples/dog-3.jpeg", None],
|
50 |
]
|
|
|
|
|
|
|
|
|
|
|
51 |
|
52 |
VIDEO_SCALE_FACTOR = 0.5
|
53 |
VIDEO_TARGET_DIRECTORY = "tmp"
|
@@ -328,6 +333,18 @@ with gr.Blocks() as demo:
|
|
328 |
with gr.Column():
|
329 |
video_processing_video_output_component = gr.Video(
|
330 |
label='Video output')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
331 |
|
332 |
image_processing_submit_button_component.click(
|
333 |
fn=process_image,
|
|
|
43 |
"""
|
44 |
|
45 |
IMAGE_PROCESSING_EXAMPLES = [
|
46 |
+
[IMAGE_OPEN_VOCABULARY_DETECTION_MODE, "https://media.roboflow.com/notebooks/examples/dog-2.jpeg", 'straw, white napkin, black napkin, hair'],
|
47 |
[IMAGE_OPEN_VOCABULARY_DETECTION_MODE, "https://media.roboflow.com/notebooks/examples/dog-3.jpeg", 'tail'],
|
48 |
[IMAGE_CAPTION_GROUNDING_MASKS_MODE, "https://media.roboflow.com/notebooks/examples/dog-2.jpeg", None],
|
49 |
[IMAGE_CAPTION_GROUNDING_MASKS_MODE, "https://media.roboflow.com/notebooks/examples/dog-3.jpeg", None],
|
50 |
]
|
51 |
+
VIDEO_PROCESSING_EXAMPLES = [
|
52 |
+
["videos/clip-07-camera-1.mp4", "player in white outfit, player in black outfit, ball, rim"],
|
53 |
+
["videos/clip-07-camera-2.mp4", "player in white outfit, player in black outfit, ball, rim"],
|
54 |
+
["videos/clip-07-camera-3.mp4", "player in white outfit, player in black outfit, ball, rim"]
|
55 |
+
]
|
56 |
|
57 |
VIDEO_SCALE_FACTOR = 0.5
|
58 |
VIDEO_TARGET_DIRECTORY = "tmp"
|
|
|
333 |
with gr.Column():
|
334 |
video_processing_video_output_component = gr.Video(
|
335 |
label='Video output')
|
336 |
+
with gr.Row():
|
337 |
+
gr.Examples(
|
338 |
+
fn=process_video,
|
339 |
+
examples=VIDEO_PROCESSING_EXAMPLES,
|
340 |
+
inputs=[
|
341 |
+
video_processing_mode_dropdown_component,
|
342 |
+
video_processing_video_input_component,
|
343 |
+
video_processing_text_input_component
|
344 |
+
],
|
345 |
+
outputs=video_processing_video_output_component,
|
346 |
+
run_on_click=True
|
347 |
+
)
|
348 |
|
349 |
image_processing_submit_button_component.click(
|
350 |
fn=process_image,
|