Spaces:
Running
on
Zero
Running
on
Zero
Martin Tomov
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -58,7 +58,7 @@ def annotate(image: Union[Image.Image, np.ndarray], detection_results: List[Dete
|
|
58 |
color = (255, 255, 255) # White color for bounding boxes and text
|
59 |
|
60 |
# Draw the filled rectangle (white filling)
|
61 |
-
cv2.rectangle(image_cv2, (box.xmin, box.ymin), (box.xmax, box.ymax), color,
|
62 |
# Draw the border
|
63 |
cv2.rectangle(image_cv2, (box.xmin, box.ymin), (box.xmax, box.ymax), color, 2) # Border
|
64 |
|
|
|
58 |
color = (255, 255, 255) # White color for bounding boxes and text
|
59 |
|
60 |
# Draw the filled rectangle (white filling)
|
61 |
+
cv2.rectangle(image_cv2, (box.xmin, box.ymin), (box.xmax, box.ymax), color, -1) # Filled white rectangle
|
62 |
# Draw the border
|
63 |
cv2.rectangle(image_cv2, (box.xmin, box.ymin), (box.xmax, box.ymax), color, 2) # Border
|
64 |
|