Spaces:
Runtime error
Runtime error
Commit
·
e563082
1
Parent(s):
a452f67
app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ def detector_humanface(image_path):
|
|
21 |
# image = cv2.imread(image_path)
|
22 |
image = image_path
|
23 |
# Converting color image to grayscale
|
24 |
-
grayscale_img = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
|
25 |
# Taking pre-trained human face detector classifier
|
26 |
face_cascade = cv2.CascadeClassifier(cv2.data.haarcascades + 'haarcascade_frontalface_alt.xml')
|
27 |
# finding face in grayscale image
|
|
|
21 |
# image = cv2.imread(image_path)
|
22 |
image = image_path
|
23 |
# Converting color image to grayscale
|
24 |
+
grayscale_img = cv2.cvtColor(np.array(image), cv2.COLOR_BGR2GRAY)
|
25 |
# Taking pre-trained human face detector classifier
|
26 |
face_cascade = cv2.CascadeClassifier(cv2.data.haarcascades + 'haarcascade_frontalface_alt.xml')
|
27 |
# finding face in grayscale image
|