Using OpenFace-Cambridge Face Expression Toolbox
OpenFace is a powerful toolkit that provides facial landmark detection, pose tracking, action unit recognition, gaze tracking, and facial feature extractions. Here I share the simple way to setup OpenFace using a Docker container.
Install Docker
Install docker at https://docs.docker.com/docker-for-mac/install/#download-docker-for-mac
Download the Docker container
The Docker container is at https://hub.docker.com/r/benbuleong/openface-cambridge/ but you essentially just have to type the following command into the terminal.
docker pull benbuleong/openface-cambridge
Run the Docker container
docker run -dit --name openface -v /Users/jinhyuncheong/Dropbox/facecam_exp:/opt/OpenFace/build/bin/facecam_exp benbuleong/openface-cambridge
-dit :
–name : rename your running image or Docker will name it for you
-v : attach a directory for your data
Access the Docker container
docker attach openface
Do some feature extraction
./FeatureExtraction -f facecam_exp/Data/Jin/2_720_trimmed.MP4 -outroot facecam_exp/Data/Jin -of 2_Jin_OF.csv -q
See the full argument and other methods here
The output file is a csv file in which Facial Action Units are listed in terms of presence and intensity.
Action units covered are:
|
---|
emotion
openface
docker
facial-expressions
emotions