Ean Yang
commited on
Commit
·
3d10107
1
Parent(s):
28d9f4f
完善图片路径
Browse files- app.py +3 -2
- bus.jpg +0 -0
- zidane.jpg +0 -0
app.py
CHANGED
@@ -2,6 +2,7 @@ import gradio as gr
|
|
2 |
import cv2
|
3 |
import tempfile
|
4 |
from ultralytics import YOLOv10
|
|
|
5 |
|
6 |
def yolov10_inference(image, video, model_id, image_size, conf_threshold):
|
7 |
model = YOLOv10.from_pretrained(f'jameslahm/{model_id}')
|
@@ -116,13 +117,13 @@ def app():
|
|
116 |
gr.Examples(
|
117 |
examples=[
|
118 |
[
|
119 |
-
"
|
120 |
"yolov10s",
|
121 |
640,
|
122 |
0.25,
|
123 |
],
|
124 |
[
|
125 |
-
"
|
126 |
"yolov10s",
|
127 |
640,
|
128 |
0.25,
|
|
|
2 |
import cv2
|
3 |
import tempfile
|
4 |
from ultralytics import YOLOv10
|
5 |
+
import os
|
6 |
|
7 |
def yolov10_inference(image, video, model_id, image_size, conf_threshold):
|
8 |
model = YOLOv10.from_pretrained(f'jameslahm/{model_id}')
|
|
|
117 |
gr.Examples(
|
118 |
examples=[
|
119 |
[
|
120 |
+
os.path.join("ultralytics", "assets", "bus.jpg"),
|
121 |
"yolov10s",
|
122 |
640,
|
123 |
0.25,
|
124 |
],
|
125 |
[
|
126 |
+
os.path.join("ultralytics", "assets", "zidane.jpg"),
|
127 |
"yolov10s",
|
128 |
640,
|
129 |
0.25,
|
bus.jpg
DELETED
Binary file (137 kB)
|
|
zidane.jpg
DELETED
Binary file (50.4 kB)
|
|