Spaces:
Runtime error
Runtime error
Commit
·
4147273
1
Parent(s):
0a94efb
Update app.py
Browse files
app.py
CHANGED
@@ -187,6 +187,7 @@ examples_images = ['data/images/1.jpg',
|
|
187 |
examples_videos = ['data/video/1.mp4','data/video/2.mp4']
|
188 |
|
189 |
models = ['yolov8m','yolov7','yolov7t']
|
|
|
190 |
|
191 |
with gr.Blocks() as demo:
|
192 |
gr.Markdown("## IDD Inference on Yolo V7 and V8 ")
|
@@ -208,6 +209,7 @@ with gr.Blocks() as demo:
|
|
208 |
video_output = gr.Video(type="pil", label="Output Video",format="mp4")
|
209 |
fps_video = gr.Number(0,label='FPS')
|
210 |
video_drop = gr.Dropdown(choices=models,value=models[0])
|
|
|
211 |
video_iou_threshold = gr.Slider(label="IOU Threshold",interactive=True, minimum=0.0, maximum=1.0, value=0.45)
|
212 |
video_conf_threshold = gr.Slider(label="Confidence Threshold",interactive=True, minimum=0.0, maximum=1.0, value=0.25)
|
213 |
gr.Examples(examples=examples_videos,inputs=video_input,outputs=video_output)
|
@@ -223,7 +225,7 @@ with gr.Blocks() as demo:
|
|
223 |
video_button_detect.click(inference2, inputs=[video_input,video_drop,
|
224 |
video_iou_threshold,video_conf_threshold],
|
225 |
outputs=[video_output,fps_video])
|
226 |
-
video_button_track.click(MODT,inputs=[video_input,video_drop,
|
227 |
outputs=[video_output, fps_video])
|
228 |
|
229 |
demo.launch(debug=True,enable_queue=True)
|
|
|
187 |
examples_videos = ['data/video/1.mp4','data/video/2.mp4']
|
188 |
|
189 |
models = ['yolov8m','yolov7','yolov7t']
|
190 |
+
trackers = ['strongsort', 'bytetrack', 'ocsort']
|
191 |
|
192 |
with gr.Blocks() as demo:
|
193 |
gr.Markdown("## IDD Inference on Yolo V7 and V8 ")
|
|
|
209 |
video_output = gr.Video(type="pil", label="Output Video",format="mp4")
|
210 |
fps_video = gr.Number(0,label='FPS')
|
211 |
video_drop = gr.Dropdown(choices=models,value=models[0])
|
212 |
+
tracking_drop = gr.Dropdown(choices=trackers,value=models[0])
|
213 |
video_iou_threshold = gr.Slider(label="IOU Threshold",interactive=True, minimum=0.0, maximum=1.0, value=0.45)
|
214 |
video_conf_threshold = gr.Slider(label="Confidence Threshold",interactive=True, minimum=0.0, maximum=1.0, value=0.25)
|
215 |
gr.Examples(examples=examples_videos,inputs=video_input,outputs=video_output)
|
|
|
225 |
video_button_detect.click(inference2, inputs=[video_input,video_drop,
|
226 |
video_iou_threshold,video_conf_threshold],
|
227 |
outputs=[video_output,fps_video])
|
228 |
+
video_button_track.click(MODT,inputs=[video_input,video_drop, tracking_drop],
|
229 |
outputs=[video_output, fps_video])
|
230 |
|
231 |
demo.launch(debug=True,enable_queue=True)
|