Spaces:
Sleeping
Sleeping
Only detect person
Browse files
app.py
CHANGED
|
@@ -3,7 +3,7 @@ import PIL.Image as Image
|
|
| 3 |
|
| 4 |
from ultralytics import ASSETS, YOLO
|
| 5 |
|
| 6 |
-
model = YOLO("
|
| 7 |
|
| 8 |
|
| 9 |
def predict_image(img, conf_threshold, iou_threshold):
|
|
@@ -15,6 +15,7 @@ def predict_image(img, conf_threshold, iou_threshold):
|
|
| 15 |
show_labels=True,
|
| 16 |
show_conf=True,
|
| 17 |
imgsz=640,
|
|
|
|
| 18 |
)
|
| 19 |
|
| 20 |
for r in results:
|
|
|
|
| 3 |
|
| 4 |
from ultralytics import ASSETS, YOLO
|
| 5 |
|
| 6 |
+
model = YOLO("yolo12n.pt")
|
| 7 |
|
| 8 |
|
| 9 |
def predict_image(img, conf_threshold, iou_threshold):
|
|
|
|
| 15 |
show_labels=True,
|
| 16 |
show_conf=True,
|
| 17 |
imgsz=640,
|
| 18 |
+
classes=[0]
|
| 19 |
)
|
| 20 |
|
| 21 |
for r in results:
|