Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -105,7 +105,7 @@ if img_file_buffer is not None:
|
|
105 |
st.write(name)
|
106 |
y1, x2, y2, x1 = faceLoc
|
107 |
y1, x2, y2, x1 = y1*4,x2*4,y2*4,x1*4
|
108 |
-
|
109 |
cv2.rectangle(image,(x1,y1),(x2,y2),(0,255,0),2)
|
110 |
cv2.rectangle(image,(x1,y2-35),(x2,y2),(0,255,0),cv2.FILLED)
|
111 |
cv2.putText(image,name,(x1+6,y2-6),cv2.FONT_HERSHEY_COMPLEX,1,(255, 255, 255),2)
|
|
|
105 |
st.write(name)
|
106 |
y1, x2, y2, x1 = faceLoc
|
107 |
y1, x2, y2, x1 = y1*4,x2*4,y2*4,x1*4
|
108 |
+
image = cv2.UMat(image)
|
109 |
cv2.rectangle(image,(x1,y1),(x2,y2),(0,255,0),2)
|
110 |
cv2.rectangle(image,(x1,y2-35),(x2,y2),(0,255,0),cv2.FILLED)
|
111 |
cv2.putText(image,name,(x1+6,y2-6),cv2.FONT_HERSHEY_COMPLEX,1,(255, 255, 255),2)
|