TadasBaltrusaitis / OpenFace

OpenFace – a state-of-the art tool intended for facial landmark detection, head pose estimation, facial action unit recognition, and eye-gaze estimation.
Other
6.86k stars 1.84k forks source link

How do I set up for use with matlab? #794

Closed JaDameron closed 4 years ago

JaDameron commented 4 years ago

Hey Tadas,

I want to use your code for a matlab project I'm working on. Specifically, I want to collect facial action units from videos.

You'll have to bear with me since I'm fairly new to programming, outside of matlab anyway.

Do I still need to build 'OpenFace.snl' with Visual Studio 2017? Or is everything I need in the 'matlab_version' folder?

I'm using 64bit windows 10 and matlab 2019b.

I'm a little confused as to what steps I need to follow in order to be able to interface your code with a matlab script.

Thanks.

TadasBaltrusaitis commented 4 years ago

Hi,

Are you just interested in extracting action units from videos?

You can use the Matlab code directly for facial landmark detection, but not Action Unit extraction, however, there are Matlab "wrapper" scripts that call the C++ executables for Action Unit extraction. You can see some examples in .\matlab_runners\Action Unit Experiments, however, to use that you need to build the executables with Visual Studio.

If you're using Windows you can also use the pre-build binaries, especially the graphical user interface ones for your processing needs, you can find them here - https://github.com/TadasBaltrusaitis/OpenFace/releases

Thanks, Tadas

JaDameron commented 4 years ago

Got it!

I didn't realize that running through the gui binaries would output the data in a csv file. So I thought I would need to use the matlab "wrappers" in some way to extract the AU data from the videos.

I can just run the videos through the program, then separately load the csv files into matlab as needed. Which works for me since I don't need to do my processing in real time or anything.

Thanks so much for your awesome help!