kiiwee commited on
Commit
16b754e
1 Parent(s): bf62103

Update yolo_utils.py

Browse files
Files changed (1) hide show
  1. yolo_utils.py +2 -2
yolo_utils.py CHANGED
@@ -11,8 +11,8 @@ FILENAME = "insectYolo.pt"
11
  # Ensure you have the model file
12
  model = YOLO(hf_hub_download(repo_id=REPO_ID, filename=FILENAME))
13
  def yolo_processimage(image):
14
- results = model(source=image, show=True,save=True,
15
- conf=0.2, device='mps',save_crop=True)
16
  rgb_image = cv2.cvtColor(results[0].plot(), cv2.COLOR_BGR2RGB)
17
  return rgb_image
18
 
 
11
  # Ensure you have the model file
12
  model = YOLO(hf_hub_download(repo_id=REPO_ID, filename=FILENAME))
13
  def yolo_processimage(image):
14
+ results = model(source=image,
15
+ conf=0.2, device='cpu')
16
  rgb_image = cv2.cvtColor(results[0].plot(), cv2.COLOR_BGR2RGB)
17
  return rgb_image
18