Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -68,6 +68,9 @@ def extract_hog_features(img):
|
|
| 68 |
return hog_features
|
| 69 |
|
| 70 |
def get_face(img):
|
|
|
|
|
|
|
|
|
|
| 71 |
detector = MTCNN()
|
| 72 |
faces = detector.detect_faces(img)
|
| 73 |
if faces:
|
|
|
|
| 68 |
return hog_features
|
| 69 |
|
| 70 |
def get_face(img):
|
| 71 |
+
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
|
| 72 |
+
img = img.astype(np.float32) / 255.0
|
| 73 |
+
|
| 74 |
detector = MTCNN()
|
| 75 |
faces = detector.detect_faces(img)
|
| 76 |
if faces:
|