Spaces:
Sleeping
Sleeping
sarwansingh
commited on
Commit
•
f813809
1
Parent(s):
c57d389
Update app.py
Browse files
app.py
CHANGED
@@ -56,7 +56,7 @@ if file_name is not None:
|
|
56 |
match_found = True # Set the flag to True
|
57 |
|
58 |
y1, x2, y2, x1 = faceLoc
|
59 |
-
y1, x2, y2, x1 = y1 * 4, x2 * 4, y2 * 4, x1 * 4
|
60 |
cv2.rectangle(image, (x1, y1), (x2, y2), (0, 255, 0), 2)
|
61 |
cv2.rectangle(image, (x1, y2 - 35), (x2, y2), (0, 255, 0), cv2.FILLED)
|
62 |
cv2.putText(image, name, (x1 + 6, y2 - 6), cv2.FONT_HERSHEY_COMPLEX, 1, (255, 255, 255), 2)
|
|
|
56 |
match_found = True # Set the flag to True
|
57 |
|
58 |
y1, x2, y2, x1 = faceLoc
|
59 |
+
y1, x2, y2, x1 = (y1 * 4).astype(int), (x2 * 4).astype(int), (y2 * 4).astype(int), (x1 * 4).astype(int)
|
60 |
cv2.rectangle(image, (x1, y1), (x2, y2), (0, 255, 0), 2)
|
61 |
cv2.rectangle(image, (x1, y2 - 35), (x2, y2), (0, 255, 0), cv2.FILLED)
|
62 |
cv2.putText(image, name, (x1 + 6, y2 - 6), cv2.FONT_HERSHEY_COMPLEX, 1, (255, 255, 255), 2)
|