Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -20,7 +20,7 @@ logger = logging.getLogger(__name__)
|
|
20 |
|
21 |
|
22 |
# 下載YOLOv8預訓練模型
|
23 |
-
model_yolo = YOLO('
|
24 |
|
25 |
|
26 |
dog_breeds = ["Afghan_Hound", "African_Hunting_Dog", "Airedale", "American_Staffordshire_Terrier",
|
@@ -218,7 +218,7 @@ async def predict_single_dog(image):
|
|
218 |
# return iou
|
219 |
|
220 |
|
221 |
-
async def detect_multiple_dogs(image, conf_threshold=0.
|
222 |
results = model_yolo(image, conf=conf_threshold, iou=iou_threshold)[0]
|
223 |
dogs = []
|
224 |
boxes = []
|
|
|
20 |
|
21 |
|
22 |
# 下載YOLOv8預訓練模型
|
23 |
+
model_yolo = YOLO('yolov8m.pt') # 使用 YOLOv8 預訓練模型
|
24 |
|
25 |
|
26 |
dog_breeds = ["Afghan_Hound", "African_Hunting_Dog", "Airedale", "American_Staffordshire_Terrier",
|
|
|
218 |
# return iou
|
219 |
|
220 |
|
221 |
+
async def detect_multiple_dogs(image, conf_threshold=0.25, iou_threshold=0.3):
|
222 |
results = model_yolo(image, conf=conf_threshold, iou=iou_threshold)[0]
|
223 |
dogs = []
|
224 |
boxes = []
|