muhammadsalmanalfaridzi commited on
Commit
15db8b0
·
verified ·
1 Parent(s): add5d86

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -101,7 +101,7 @@ def detect_combined(image):
101
  # Gambar bounding box untuk kompetitor (Merah) dengan label 'unclassified' jika sesuai
102
  for comp in competitor_boxes:
103
  x1, y1, x2, y2 = comp['box']
104
- unclassified_classes = ["beverage", "bottle", "cans", "tetra pak", "carton drink"]
105
  display_name = "unclassified" if any(cls in comp['class'].lower() for cls in unclassified_classes) else comp['class']
106
  cv2.rectangle(img, (int(x1), int(y1)), (int(x2), int(y2)), (0, 0, 255), 2)
107
  cv2.putText(img, f"{display_name} {comp['confidence']:.2f}",
 
101
  # Gambar bounding box untuk kompetitor (Merah) dengan label 'unclassified' jika sesuai
102
  for comp in competitor_boxes:
103
  x1, y1, x2, y2 = comp['box']
104
+ unclassified_classes = ["cans"]
105
  display_name = "unclassified" if any(cls in comp['class'].lower() for cls in unclassified_classes) else comp['class']
106
  cv2.rectangle(img, (int(x1), int(y1)), (int(x2), int(y2)), (0, 0, 255), 2)
107
  cv2.putText(img, f"{display_name} {comp['confidence']:.2f}",