Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -28,8 +28,10 @@ def Get_logo_xywh(model_result_input):
|
|
28 |
|
29 |
def predict_image(img, conf_threshold, iou_threshold):
|
30 |
"""Predicts and plots labeled objects in an image using YOLOv8 model with adjustable confidence and IOU thresholds."""
|
|
|
|
|
31 |
# Convert the input image to grayscale
|
32 |
-
img =
|
33 |
|
34 |
logo_results = logo_model.predict(
|
35 |
source=img,
|
|
|
28 |
|
29 |
def predict_image(img, conf_threshold, iou_threshold):
|
30 |
"""Predicts and plots labeled objects in an image using YOLOv8 model with adjustable confidence and IOU thresholds."""
|
31 |
+
|
32 |
+
resized_image = img.resize((640, 640))
|
33 |
# Convert the input image to grayscale
|
34 |
+
img = resized_image.convert('L')
|
35 |
|
36 |
logo_results = logo_model.predict(
|
37 |
source=img,
|