Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -59,6 +59,7 @@ def predict_emotion(frame):
|
|
59 |
faces = face_detection.detectMultiScale(gray, scaleFactor=1.1,
|
60 |
minNeighbors=5, minSize=(30, 30),
|
61 |
flags=cv2.CASCADE_SCALE_IMAGE)
|
|
|
62 |
|
63 |
for (fX, fY, fW, fH) in faces:
|
64 |
# Extract the ROI of the face from the grayscale image, resize it to a fixed 28x28 pixels, and then prepare
|
|
|
59 |
faces = face_detection.detectMultiScale(gray, scaleFactor=1.1,
|
60 |
minNeighbors=5, minSize=(30, 30),
|
61 |
flags=cv2.CASCADE_SCALE_IMAGE)
|
62 |
+
frame_clone = frame.copy()
|
63 |
|
64 |
for (fX, fY, fW, fH) in faces:
|
65 |
# Extract the ROI of the face from the grayscale image, resize it to a fixed 28x28 pixels, and then prepare
|