mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 12:05:22 +00:00
fix bug
This commit is contained in:
parent
22e1a348a8
commit
d3d33436a1
@ -65,7 +65,7 @@ class DeepFaceLite(object):
|
||||
for i in range(0, len(emotion_labels)):
|
||||
emotion_label = emotion_labels[i]
|
||||
emotion_prediction = 100 * emotion_predictions[i] / sum_of_predictions
|
||||
emotion[emotion_label] = emotion_prediction
|
||||
all_emotions[emotion_label] = emotion_prediction
|
||||
|
||||
emotion = {
|
||||
'all': all_emotions,
|
||||
|
@ -670,7 +670,6 @@ def preprocess_face(base_img, enforce_detection=True, detector_backend='opencv')
|
||||
img_gray = cv2.resize(img, target_size)
|
||||
img_gray = cv2.cvtColor(img_gray, cv2.COLOR_BGR2GRAY)
|
||||
img_pixels_gray = image.img_to_array(img_gray)
|
||||
print(img_pixels_gray.shape)
|
||||
img_pixels_gray = np.expand_dims(img_pixels_gray, axis=0)
|
||||
img_pixels_gray /= 255 # normalize input in [0, 1]
|
||||
pixels_gray.append(img_pixels_gray)
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user