banao-tech commited on
Commit
82d3a70
·
verified ·
1 Parent(s): 8cc07e5

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +2 -4
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
- 'conf_thres': box_threshold, # Correct parameter name
383
- 'iou_thres': iou_threshold,
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