Jamshaid89
commited on
Commit
•
80e72b0
1
Parent(s):
24eb744
Changed the thickness and text pos
Browse files
app.py
CHANGED
@@ -100,13 +100,13 @@ def predict_image(image):
|
|
100 |
y = identity["facial_area"]["y"]
|
101 |
w = identity["facial_area"]["w"]
|
102 |
h = identity["facial_area"]["h"]
|
103 |
-
cv2.rectangle(output_img, (x,y), (x+w,y+h), (0, 0, 255),
|
104 |
|
105 |
# Define the text position
|
106 |
-
text_position = (x, y+h+
|
107 |
|
108 |
# Add the text to the image
|
109 |
-
cv2.putText(output_img ,identity["name"], text_position, cv2.FONT_HERSHEY_SIMPLEX, 0.7, (0, 255,0 ),
|
110 |
return output_img
|
111 |
|
112 |
|
|
|
100 |
y = identity["facial_area"]["y"]
|
101 |
w = identity["facial_area"]["w"]
|
102 |
h = identity["facial_area"]["h"]
|
103 |
+
cv2.rectangle(output_img, (x,y), (x+w,y+h), (0, 0, 255), 1)
|
104 |
|
105 |
# Define the text position
|
106 |
+
text_position = (x, y+h+5)
|
107 |
|
108 |
# Add the text to the image
|
109 |
+
cv2.putText(output_img ,identity["name"], text_position, cv2.FONT_HERSHEY_SIMPLEX, 0.7, (0, 255,0 ), 1)
|
110 |
return output_img
|
111 |
|
112 |
|