|
@ -47,11 +47,9 @@ def processImage(image, idx, foldername, video_path): |
|
|
img_path=image, |
|
|
img_path=image, |
|
|
actions=['emotion'], |
|
|
actions=['emotion'], |
|
|
enforce_detection=True, |
|
|
enforce_detection=True, |
|
|
detector_backend=backends[3] |
|
|
detector_backend=backends[0] |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
print(anaylse_obj) |
|
|
|
|
|
|
|
|
|
|
|
emotions = anaylse_obj[0]['emotion'] |
|
|
emotions = anaylse_obj[0]['emotion'] |
|
|
|
|
|
|
|
|
num_of_faces = len(anaylse_obj) |
|
|
num_of_faces = len(anaylse_obj) |
|
@ -64,8 +62,6 @@ def processImage(image, idx, foldername, video_path): |
|
|
|
|
|
|
|
|
averages = {emotion: sums[emotion] / num_of_faces for emotion in sums} |
|
|
averages = {emotion: sums[emotion] / num_of_faces for emotion in sums} |
|
|
|
|
|
|
|
|
print(f"averages: {averages}") |
|
|
|
|
|
|
|
|
|
|
|
raw_emotions = [value for value in averages.values()] |
|
|
raw_emotions = [value for value in averages.values()] |
|
|
|
|
|
|
|
|
normalized_emotions = [value / 100 for value in raw_emotions] |
|
|
normalized_emotions = [value / 100 for value in raw_emotions] |
|
|