Spaces:
Runtime error
Runtime error
Diego Fernández
commited on
Commit
·
3d6c603
1
Parent(s):
9d1a8a7
chore: add examples
Browse files- .gitattributes +3 -0
- app.py +24 -11
- examples/norfair_demo.mp4 +3 -0
- examples/soccer.mp4 +3 -0
.gitattributes
CHANGED
@@ -29,3 +29,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
29 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
30 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
31 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
29 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
30 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
31 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
32 |
+
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
33 |
+
examples/norfair_demo.mp4 filter=lfs diff=lfs merge=lfs -text
|
34 |
+
examples/soccer.mp4 filter=lfs diff=lfs merge=lfs -text
|
app.py
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
from inference import inference
|
@@ -16,16 +18,27 @@ dd_track_points = gr.Dropdown(
|
|
16 |
|
17 |
slide_threshold = gr.Slider(minimum=0, maximum=1, value=0.25, label="Model confidence threshold")
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
iface = gr.Interface(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
iface.launch()
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
import gradio as gr
|
4 |
|
5 |
from inference import inference
|
|
|
18 |
|
19 |
slide_threshold = gr.Slider(minimum=0, maximum=1, value=0.25, label="Model confidence threshold")
|
20 |
|
21 |
+
# examples_folder = "examples"
|
22 |
+
# examples_list = []
|
23 |
+
|
24 |
+
# if os.path.isdir(examples_folder):
|
25 |
+
# for file in os.listdir(examples_folder):
|
26 |
+
# path = examples_folder + "/" + file
|
27 |
+
# examples_list.append([path])
|
28 |
+
|
29 |
+
output_component = "playablevideo"
|
30 |
+
|
31 |
+
iface = gr.Interface(
|
32 |
+
fn=inference,
|
33 |
+
inputs=[
|
34 |
+
input_video,
|
35 |
+
dd_model,
|
36 |
+
cb_motion_estimation,
|
37 |
+
cb_path_draw,
|
38 |
+
dd_track_points,
|
39 |
+
slide_threshold,
|
40 |
+
],
|
41 |
+
outputs=output_component,
|
42 |
+
)
|
43 |
|
44 |
iface.launch()
|
examples/norfair_demo.mp4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:229c5a583c452013772c23500151729aac7ec31e842467d0a59079c8a794bdaf
|
3 |
+
size 6431821
|
examples/soccer.mp4
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:59c2130cc691e92b5178cfb6285c253bdd1fa178764abba1c59289fc1b15450d
|
3 |
+
size 6211233
|