Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -57,14 +57,14 @@ def Track(video, tracking_method):
|
|
57 |
return temp_result_path
|
58 |
|
59 |
# 候选视频
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
|
69 |
iface_Image = gr.Interface(fn=Detect,
|
70 |
inputs=gr.Image(label="上传一张红外图像,仅支持jpg格式"),
|
@@ -78,7 +78,7 @@ iface_video = gr.Interface(fn=Track,
|
|
78 |
info="选择追踪器",
|
79 |
value="bytetrack")],
|
80 |
outputs=gr.Video(label="追踪结果"),
|
81 |
-
|
82 |
)
|
83 |
|
84 |
demo = gr.TabbedInterface([iface_video, iface_Image], tab_names=["目标追踪", "目标检测"], title="红外目标检测追踪")
|
|
|
57 |
return temp_result_path
|
58 |
|
59 |
# 候选视频
|
60 |
+
example_video= [
|
61 |
+
["./video/5.mp4", "bytetrack"],
|
62 |
+
["./video/bicyclecity.mp4", "strongsort"],
|
63 |
+
["./video/9.mp4", "bytetrack"],
|
64 |
+
["./video/8.mp4", "strongsort"],
|
65 |
+
["./video/4.mp4", "bytetrack"],
|
66 |
+
["./video/car.mp4", "strongsort"],
|
67 |
+
]
|
68 |
|
69 |
iface_Image = gr.Interface(fn=Detect,
|
70 |
inputs=gr.Image(label="上传一张红外图像,仅支持jpg格式"),
|
|
|
78 |
info="选择追踪器",
|
79 |
value="bytetrack")],
|
80 |
outputs=gr.Video(label="追踪结果"),
|
81 |
+
examples=example_video
|
82 |
)
|
83 |
|
84 |
demo = gr.TabbedInterface([iface_video, iface_Image], tab_names=["目标追踪", "目标检测"], title="红外目标检测追踪")
|