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",
|
@@ -167,7 +167,7 @@ async def predict_single_dog(image):
|
|
167 |
return top1_prob, topk_breeds, topk_probs_percent
|
168 |
|
169 |
|
170 |
-
async def detect_multiple_dogs(image, conf_threshold=0.4, iou_threshold=0.
|
171 |
results = model_yolo(image, conf=conf_threshold, iou=iou_threshold)[0]
|
172 |
dogs = []
|
173 |
boxes = []
|
|
|
20 |
|
21 |
|
22 |
# 下載YOLOv8預訓練模型
|
23 |
+
model_yolo = YOLO('yolov8n.pt') # 使用 YOLOv8 預訓練模型
|
24 |
|
25 |
|
26 |
dog_breeds = ["Afghan_Hound", "African_Hunting_Dog", "Airedale", "American_Staffordshire_Terrier",
|
|
|
167 |
return top1_prob, topk_breeds, topk_probs_percent
|
168 |
|
169 |
|
170 |
+
async def detect_multiple_dogs(image, conf_threshold=0.4, iou_threshold=0.55):
|
171 |
results = model_yolo(image, conf=conf_threshold, iou=iou_threshold)[0]
|
172 |
dogs = []
|
173 |
boxes = []
|