Eshin Jolly
py-feat.org
SLAB 04/28/22
Major muscles of the face that form the basis of FACS (Zarins, 2014)
Goal: Given input images and labels (e.g. AUs, emotions, landmarks), learn a model that can predict labels from the input images
Always inspect model predictions and images when you use automated techniques!
Py-Feat
glues all this together for you!Detector
Fex
Detector
(s)plotting
and utils
functions
from feat import Detector, Fex
detector = Detector()
detections = detector.detect_image('./imgs/single_face.jpg') # <-- Returns a Fex dataclass!
detections.head()
frame | FaceRectX | FaceRectY | FaceRectWidth | FaceRectHeight | FaceScore | x_0 | x_1 | x_2 | x_3 | ... | Roll | Yaw | anger | disgust | fear | happiness | sadness | surprise | neutral | input | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 0 | 196.976837 | 140.997742 | 173.810486 | 257.639343 | 0.999681 | 192.864593 | 191.586715 | 192.874618 | 197.394792 | ... | -1.903955 | 4.869262 | 0.000369 | 0.000026 | 0.000485 | 0.986996 | 0.000046 | 0.01201 | 0.000068 | ./imgs/single_face.jpg |
1 rows × 173 columns
Now we can do other stuff like:
py-feat
to compare conditions: