Spaces:
Sleeping
Sleeping
Commit
·
bcfa825
1
Parent(s):
601a6c6
Fix: p bbox parameters
Browse files
app.py
CHANGED
@@ -45,8 +45,7 @@ def parse_detections(results, yolo_version):
|
|
45 |
# Draw bounding boxes and labels
|
46 |
def draw_detections(boxes, colors, names, img):
|
47 |
for box, color, name in zip(boxes, colors, names):
|
48 |
-
|
49 |
-
xmin, ymin, xmax, ymax = box[0]
|
50 |
cv2.rectangle(img, (xmin, ymin), (xmax, ymax), color, 2)
|
51 |
cv2.putText(img, name, (xmin, ymin - 5),
|
52 |
cv2.FONT_HERSHEY_SIMPLEX, 0.8, color, 2,
|
|
|
45 |
# Draw bounding boxes and labels
|
46 |
def draw_detections(boxes, colors, names, img):
|
47 |
for box, color, name in zip(boxes, colors, names):
|
48 |
+
xmin, ymin, xmax, ymax = map(int, box[0].tolist())
|
|
|
49 |
cv2.rectangle(img, (xmin, ymin), (xmax, ymax), color, 2)
|
50 |
cv2.putText(img, name, (xmin, ymin - 5),
|
51 |
cv2.FONT_HERSHEY_SIMPLEX, 0.8, color, 2,
|