ihp-lab / LibreFace

[WACV 2024] LibreFace: An Open-Source Toolkit for Deep Facial Expression Analysis
https://boese0601.github.io/libreface/
Other
96 stars 16 forks source link

Why do the `get_facial_attributes` function and the `get_facial_expression` function produce different facial expression prediction categories? #9

Open doudousukyi37 opened 1 month ago

doudousukyi37 commented 1 month ago

when i use the get_facial_attributes function and the get_facial_expression function to predict same picture ,they return different facial expression. my code is:

import libreface
import cv2

image1_path = '/app/libreface/test_images/ruiangry.jpg'
image1 = cv2.imread(image1_path)

detected_attributes = libreface.get_facial_attributes(image1_path)

expression_label = libreface.get_facial_expression(image1_path)

print(detected_attributes['detected_aus'])

print(detected_attributes['facial_expression'])

print(expression_label)

and return


{'au_1': 0, 'au_2': 0, 'au_4': 0, 'au_6': 0, 'au_7': 0, 'au_10': 1, 'au_12': 0, 'au_14': 0, 'au_15': 0, 'au_17': 0, 'au_23': 0, 'au_24': 0}
Disgust
Neutral