Spaces:
Runtime error
Runtime error
DerrylNessie
commited on
Commit
•
36ab272
1
Parent(s):
1b1fded
Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ def midpoint(x1, y1, x2, y2):
|
|
17 |
return (x_mid, y_mid)
|
18 |
|
19 |
def draw_mask(img, bounds, color='yellow', width=2):
|
20 |
-
|
21 |
for bound in bounds:
|
22 |
p0, p1, p2, p3 = bound[0]
|
23 |
draw.line([*p0, *p1, *p2, *p3, *p0], fill=color, width=width)
|
|
|
17 |
return (x_mid, y_mid)
|
18 |
|
19 |
def draw_mask(img, bounds, color='yellow', width=2):
|
20 |
+
draw = ImageDraw.Draw(img)
|
21 |
for bound in bounds:
|
22 |
p0, p1, p2, p3 = bound[0]
|
23 |
draw.line([*p0, *p1, *p2, *p3, *p0], fill=color, width=width)
|