silver-A commited on
Commit
b86652f
·
verified ·
1 Parent(s): 8c24574

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -48,13 +48,17 @@ def yolov10_inference_multi(image, image_size, conf_threshold, iou_threshold):
48
  yolov10s_image = yolov10_inference(image, "yolov10s.pt", image_size, conf_threshold, iou_threshold)
49
  yolov10m_image = yolov10_inference(image, "yolov10m.pt", image_size, conf_threshold, iou_threshold)
50
  yolov10b_image = yolov10_inference(image, "yolov10b.pt", image_size, conf_threshold, iou_threshold)
51
- return yolov10n_image, yolov10s_image, yolov10m_image, yolov10b_image
 
 
52
 
53
  def app():
54
  with gr.Blocks():
55
  with gr.Row():
56
  with gr.Column():
57
  image = gr.Image(type="pil", label="Image")
 
 
58
  image_size = gr.Slider(
59
  label="Image Size",
60
  minimum=320,
@@ -92,7 +96,7 @@ def app():
92
  conf_threshold,
93
  iou_threshold,
94
  ],
95
- outputs=[output_image_n, output_image_s, output_image_m, output_image_b],
96
  )
97
 
98
  gr.Examples(
@@ -123,7 +127,7 @@ def app():
123
  conf_threshold,
124
  iou_threshold,
125
  ],
126
- outputs=[output_image_n, output_image_s, output_image_m, output_image_b],
127
  cache_examples=True,
128
  )
129
 
@@ -132,7 +136,7 @@ with gradio_app:
132
  gr.HTML(
133
  """
134
  <h1 style='text-align: center'>
135
- YOLOv10: Real-Time Object Detection
136
  </h1>
137
  """)
138
  with gr.Row():
 
48
  yolov10s_image = yolov10_inference(image, "yolov10s.pt", image_size, conf_threshold, iou_threshold)
49
  yolov10m_image = yolov10_inference(image, "yolov10m.pt", image_size, conf_threshold, iou_threshold)
50
  yolov10b_image = yolov10_inference(image, "yolov10b.pt", image_size, conf_threshold, iou_threshold)
51
+ yolov10l_image = yolov10_inference(image, "yolov10l.pt", image_size, conf_threshold, iou_threshold)
52
+ yolov10x_image = yolov10_inference(image, "yolov10x.pt", image_size, conf_threshold, iou_threshold)
53
+ return yolov10n_image, yolov10s_image, yolov10m_image, yolov10b_image, yolov10l_image, yolov10x_image
54
 
55
  def app():
56
  with gr.Blocks():
57
  with gr.Row():
58
  with gr.Column():
59
  image = gr.Image(type="pil", label="Image")
60
+ output_image_l = gr.Image(type="pil", label="yolov10l")
61
+ output_image_x = gr.Image(type="pil", label="yolov10x")
62
  image_size = gr.Slider(
63
  label="Image Size",
64
  minimum=320,
 
96
  conf_threshold,
97
  iou_threshold,
98
  ],
99
+ outputs=[output_image_n, output_image_s, output_image_m, output_image_b, , output_image_l, output_image_x],
100
  )
101
 
102
  gr.Examples(
 
127
  conf_threshold,
128
  iou_threshold,
129
  ],
130
+ outputs=[output_image_n, output_image_s, output_image_m, output_image_b, , output_image_l, output_image_x],
131
  cache_examples=True,
132
  )
133
 
 
136
  gr.HTML(
137
  """
138
  <h1 style='text-align: center'>
139
+ YOLOv10 - Comparison of Models
140
  </h1>
141
  """)
142
  with gr.Row():