Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -122,13 +122,13 @@ def detect_combined(image):
|
|
| 122 |
pt2 = (int(x + w/2), int(y + h/2))
|
| 123 |
cv2.rectangle(img, pt1, pt2, (0, 255, 0), 2)
|
| 124 |
cv2.putText(img, pred['class'], (pt1[0], pt1[1]-10),
|
| 125 |
-
cv2.FONT_HERSHEY_SIMPLEX, 0
|
| 126 |
# Gambar bounding box CountGD (merah)
|
| 127 |
for box in competitor_boxes:
|
| 128 |
x1, y1, x2, y2 = box
|
| 129 |
cv2.rectangle(img, (int(x1), int(y1)), (int(x2), int(y2)), (0, 0, 255), 2)
|
| 130 |
cv2.putText(img, "unclassified", (int(x1), int(y1)-10),
|
| 131 |
-
cv2.FONT_HERSHEY_SIMPLEX, 0
|
| 132 |
|
| 133 |
output_path = "/tmp/combined_output.jpg"
|
| 134 |
cv2.imwrite(output_path, img)
|
|
|
|
| 122 |
pt2 = (int(x + w/2), int(y + h/2))
|
| 123 |
cv2.rectangle(img, pt1, pt2, (0, 255, 0), 2)
|
| 124 |
cv2.putText(img, pred['class'], (pt1[0], pt1[1]-10),
|
| 125 |
+
cv2.FONT_HERSHEY_SIMPLEX, 1.0, (0,255,0), 3)
|
| 126 |
# Gambar bounding box CountGD (merah)
|
| 127 |
for box in competitor_boxes:
|
| 128 |
x1, y1, x2, y2 = box
|
| 129 |
cv2.rectangle(img, (int(x1), int(y1)), (int(x2), int(y2)), (0, 0, 255), 2)
|
| 130 |
cv2.putText(img, "unclassified", (int(x1), int(y1)-10),
|
| 131 |
+
cv2.FONT_HERSHEY_SIMPLEX, 1.0, (0,0,255), 3)
|
| 132 |
|
| 133 |
output_path = "/tmp/combined_output.jpg"
|
| 134 |
cv2.imwrite(output_path, img)
|