mussie1212 commited on
Commit
a58b505
·
verified ·
1 Parent(s): be2b8ca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
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 = img.convert('L')
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,