ITSAIDI
commited on
Commit
·
545abd8
1
Parent(s):
73bc32e
Update
Browse files- utilitis.py +1 -2
utilitis.py
CHANGED
@@ -125,7 +125,7 @@ def Draw(image):
|
|
125 |
# Adjust the thickness of the rectangle outline and label text position
|
126 |
rectangle_thickness = 4
|
127 |
label_x_offset = 20
|
128 |
-
label_y_offset = -
|
129 |
|
130 |
# Custom font size
|
131 |
custom_font_size = 25
|
@@ -144,7 +144,6 @@ def Draw(image):
|
|
144 |
if predicted_label != "Autre":
|
145 |
draw.rectangle(box, outline=color, width=rectangle_thickness)
|
146 |
# Draw text using the custom font and size
|
147 |
-
|
148 |
draw.rectangle((box[0], box[1]+ label_y_offset,box[2],box[3]+ label_y_offset), fill=color)
|
149 |
draw.text((box[0] + label_x_offset, box[1] + label_y_offset), text=predicted_label, fill='white', font=custom_font)
|
150 |
|
|
|
125 |
# Adjust the thickness of the rectangle outline and label text position
|
126 |
rectangle_thickness = 4
|
127 |
label_x_offset = 20
|
128 |
+
label_y_offset = -30
|
129 |
|
130 |
# Custom font size
|
131 |
custom_font_size = 25
|
|
|
144 |
if predicted_label != "Autre":
|
145 |
draw.rectangle(box, outline=color, width=rectangle_thickness)
|
146 |
# Draw text using the custom font and size
|
|
|
147 |
draw.rectangle((box[0], box[1]+ label_y_offset,box[2],box[3]+ label_y_offset), fill=color)
|
148 |
draw.text((box[0] + label_x_offset, box[1] + label_y_offset), text=predicted_label, fill='white', font=custom_font)
|
149 |
|