epilef68 commited on
Commit
5a315d5
·
verified ·
1 Parent(s): b9291b9

change output colors to rgb

Browse files
Files changed (1) hide show
  1. app.py +1 -12
app.py CHANGED
@@ -13,18 +13,7 @@ model = YOLO(model_path)
13
  def detect_cheerios(image_path):
14
  # Run inference on the input image
15
  results = model(image_path)
16
- image = results[0].plot()
17
-
18
- # # Get the first result (assuming single image input)
19
- # result = results[0]
20
-
21
- # # Draw bounding boxes on the image
22
- # for box in result.boxes:
23
- # x1, y1, x2, y2 = box.xyxy[0]
24
- # conf = box.conf[0]
25
- # cv2.rectangle(image, (int(x1), int(y1)), (int(x2), int(y2)), (0, 255, 0), 2)
26
- # cv2.putText(image, f'Apple: {conf:.2f}', (int(x1), int(y1) - 10),
27
- # cv2.FONT_HERSHEY_SIMPLEX, 0.9, (0, 255, 0), 2)
28
 
29
  return image
30
 
 
13
  def detect_cheerios(image_path):
14
  # Run inference on the input image
15
  results = model(image_path)
16
+ image = results[0].plot() [:,:,::-1]
 
 
 
 
 
 
 
 
 
 
 
17
 
18
  return image
19