Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ def detect_faces(image):
|
|
8 |
gray_image = cv2.cvtColor(image_np, cv2.COLOR_RGB2GRAY)
|
9 |
face_cascade = cv2.CascadeClassifier(cv2.data.haarcascades + "haarcascade_frontalface_default.xml")
|
10 |
faces = face_cascade.detectMultiScale(gray_image, scaleFactor=1.1, minNeighbors=5, minSize=(10, 10))
|
11 |
-
print("faces: "
|
12 |
for (x, y, w, h) in faces:
|
13 |
cv2.rectangle(image_np, (x, y), (x+w, y+h), (0, 255, 0), 2)
|
14 |
return image_np
|
|
|
8 |
gray_image = cv2.cvtColor(image_np, cv2.COLOR_RGB2GRAY)
|
9 |
face_cascade = cv2.CascadeClassifier(cv2.data.haarcascades + "haarcascade_frontalface_default.xml")
|
10 |
faces = face_cascade.detectMultiScale(gray_image, scaleFactor=1.1, minNeighbors=5, minSize=(10, 10))
|
11 |
+
print("faces: ",faces)
|
12 |
for (x, y, w, h) in faces:
|
13 |
cv2.rectangle(image_np, (x, y), (x+w, y+h), (0, 255, 0), 2)
|
14 |
return image_np
|