Spaces:
Runtime error
Runtime error
Bhaskar Saranga
commited on
Commit
•
ec6d159
1
Parent(s):
65ea0f2
Removed track and updated IOU and Conf threshold
Browse files
app.py
CHANGED
@@ -202,8 +202,8 @@ with gr.Blocks() as demo:
|
|
202 |
image_output = gr.Image(type='pil', label="Output Image", source="upload")
|
203 |
fps_image = gr.Number(0,label='FPS')
|
204 |
image_drop = gr.Dropdown(choices=models,value=models[0])
|
205 |
-
image_iou_threshold = gr.Slider(label="IOU Threshold",interactive=True, minimum=0.0, maximum=1.0, value=0.
|
206 |
-
image_conf_threshold = gr.Slider(label="Confidence Threshold",interactive=True, minimum=0.0, maximum=1.0, value=0.
|
207 |
gr.Examples(examples=examples_images,inputs=image_input,outputs=image_output)
|
208 |
text_button = gr.Button("Detect")
|
209 |
with gr.Tab("Video"):
|
@@ -213,20 +213,19 @@ with gr.Blocks() as demo:
|
|
213 |
video_output = gr.Video(type="pil", label="Output Video",format="mp4")
|
214 |
fps_video = gr.Number(0,label='FPS')
|
215 |
video_drop = gr.Dropdown(label="Model", choices=models,value=models[0])
|
216 |
-
video_iou_threshold = gr.Slider(label="IOU Threshold",interactive=True, minimum=0.0, maximum=1.0, value=0.
|
217 |
-
video_conf_threshold = gr.Slider(label="Confidence Threshold",interactive=True, minimum=0.0, maximum=1.0, value=0.
|
218 |
gr.Examples(examples=examples_videos,inputs=video_input,outputs=video_output)
|
219 |
with gr.Row():
|
220 |
video_button_detect = gr.Button("Detect")
|
221 |
-
video_button_track = gr.Button("Track")
|
222 |
|
223 |
with gr.Tab("Compare Models"):
|
224 |
gr.Markdown("## YOLOv7 vs YOLOv8 Object detection comparision")
|
225 |
with gr.Row():
|
226 |
image_comp_input = gr.Image(type='pil', label="Input Image", source="upload")
|
227 |
with gr.Row():
|
228 |
-
image_comp_iou_threshold = gr.Slider(label="IOU Threshold",interactive=True, minimum=0.0, maximum=1.0, value=0.
|
229 |
-
image_comp_conf_threshold = gr.Slider(label="Confidence Threshold",interactive=True, minimum=0.0, maximum=1.0, value=0.
|
230 |
text_comp_button = gr.Button("Detect")
|
231 |
with gr.Row():
|
232 |
image_comp_output_v7 = gr.Image(type='pil', label="YOLOv7 Output Image", source="upload")
|
@@ -243,8 +242,8 @@ with gr.Blocks() as demo:
|
|
243 |
videotr_output = gr.Video(type="pil", label="Output Video",format="mp4")
|
244 |
fpstr_video = gr.Number(0,label='FPS')
|
245 |
tracking_drop = gr.Dropdown(choices=trackers,value=trackers[0], label="Select the tracking method")
|
246 |
-
videotr_iou_threshold = gr.Slider(label="IOU Threshold",interactive=True, minimum=0.0, maximum=1.0, value=0.
|
247 |
-
videotr_conf_threshold = gr.Slider(label="Confidence Threshold",interactive=True, minimum=0.0, maximum=1.0, value=0.
|
248 |
gr.Examples(examples=examples_videos,inputs=videotr_input,outputs=videotr_output)
|
249 |
video_button_track = gr.Button("Track")
|
250 |
|
|
|
202 |
image_output = gr.Image(type='pil', label="Output Image", source="upload")
|
203 |
fps_image = gr.Number(0,label='FPS')
|
204 |
image_drop = gr.Dropdown(choices=models,value=models[0])
|
205 |
+
image_iou_threshold = gr.Slider(label="IOU Threshold",interactive=True, minimum=0.0, maximum=1.0, value=0.5)
|
206 |
+
image_conf_threshold = gr.Slider(label="Confidence Threshold",interactive=True, minimum=0.0, maximum=1.0, value=0.6)
|
207 |
gr.Examples(examples=examples_images,inputs=image_input,outputs=image_output)
|
208 |
text_button = gr.Button("Detect")
|
209 |
with gr.Tab("Video"):
|
|
|
213 |
video_output = gr.Video(type="pil", label="Output Video",format="mp4")
|
214 |
fps_video = gr.Number(0,label='FPS')
|
215 |
video_drop = gr.Dropdown(label="Model", choices=models,value=models[0])
|
216 |
+
video_iou_threshold = gr.Slider(label="IOU Threshold",interactive=True, minimum=0.0, maximum=1.0, value=0.5)
|
217 |
+
video_conf_threshold = gr.Slider(label="Confidence Threshold",interactive=True, minimum=0.0, maximum=1.0, value=0.6)
|
218 |
gr.Examples(examples=examples_videos,inputs=video_input,outputs=video_output)
|
219 |
with gr.Row():
|
220 |
video_button_detect = gr.Button("Detect")
|
|
|
221 |
|
222 |
with gr.Tab("Compare Models"):
|
223 |
gr.Markdown("## YOLOv7 vs YOLOv8 Object detection comparision")
|
224 |
with gr.Row():
|
225 |
image_comp_input = gr.Image(type='pil', label="Input Image", source="upload")
|
226 |
with gr.Row():
|
227 |
+
image_comp_iou_threshold = gr.Slider(label="IOU Threshold",interactive=True, minimum=0.0, maximum=1.0, value=0.5)
|
228 |
+
image_comp_conf_threshold = gr.Slider(label="Confidence Threshold",interactive=True, minimum=0.0, maximum=1.0, value=0.6)
|
229 |
text_comp_button = gr.Button("Detect")
|
230 |
with gr.Row():
|
231 |
image_comp_output_v7 = gr.Image(type='pil', label="YOLOv7 Output Image", source="upload")
|
|
|
242 |
videotr_output = gr.Video(type="pil", label="Output Video",format="mp4")
|
243 |
fpstr_video = gr.Number(0,label='FPS')
|
244 |
tracking_drop = gr.Dropdown(choices=trackers,value=trackers[0], label="Select the tracking method")
|
245 |
+
videotr_iou_threshold = gr.Slider(label="IOU Threshold",interactive=True, minimum=0.0, maximum=1.0, value=0.5)
|
246 |
+
videotr_conf_threshold = gr.Slider(label="Confidence Threshold",interactive=True, minimum=0.0, maximum=1.0, value=0.6)
|
247 |
gr.Examples(examples=examples_videos,inputs=videotr_input,outputs=videotr_output)
|
248 |
video_button_track = gr.Button("Track")
|
249 |
|