Spaces:
Running
Running
Update yolo_utils.py
Browse files- 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,
|
15 |
-
conf=0.2, device='
|
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 |
|