Update app.py
Browse files
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 = ["
|
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}",
|