Spaces:
Sleeping
Sleeping
Update utils.py
Browse files
utils.py
CHANGED
|
@@ -376,11 +376,9 @@ def predict(model, image, caption, box_threshold, text_threshold):
|
|
| 376 |
|
| 377 |
def predict_yolo(model, image_path, box_threshold, imgsz, scale_img, iou_threshold=0.7):
|
| 378 |
"""Use YOLO model for object detection with correct parameters"""
|
| 379 |
-
|
| 380 |
-
# Should be:
|
| 381 |
kwargs = {
|
| 382 |
-
'
|
| 383 |
-
'
|
| 384 |
'verbose': False
|
| 385 |
}
|
| 386 |
|
|
|
|
| 376 |
|
| 377 |
def predict_yolo(model, image_path, box_threshold, imgsz, scale_img, iou_threshold=0.7):
|
| 378 |
"""Use YOLO model for object detection with correct parameters"""
|
|
|
|
|
|
|
| 379 |
kwargs = {
|
| 380 |
+
'conf': box_threshold, # Correct confidence parameter
|
| 381 |
+
'iou': iou_threshold, # Correct IoU parameter
|
| 382 |
'verbose': False
|
| 383 |
}
|
| 384 |
|