Using OpenFace-Cambridge Face Expression Toolbox [updated]
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/algebr/openface/ but you essentially just have to type the following command into the terminal.
docker pull algebr/openface:latest
Run the Docker container
docker run -ti --rm --name openface -v /Volumes/jcData/Datasets/extended-cohn-kanade-images/:/home/openface-build/build/bin/ck algebr/openface:latest
-dit :
–name : rename your running image or Docker will name it for you
-v : attach a directory for your data
Access the folder with build files
cd /home/openface-build/build/bin
Do some feature extraction
./FaceLandmarkImg -fdir ck/cohn-kanade-images/S026/002 -out_dir ck/out_openface
./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