Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

action units / other notes #1

Open
ofZach opened this issue Jul 9, 2018 · 4 comments
Open

action units / other notes #1

ofZach opened this issue Jul 9, 2018 · 4 comments

Comments

@ofZach
Copy link

ofZach commented Jul 9, 2018

greetings, I was able to get action units to work by recompiling openface with a different version of boost

I think it was something like this (reviewing my history)

brew install [email protected] --cc=clang
brew link --force [email protected]

or something like this. I don't have debug and release builds of the openface libraries (not sure if there's a special cmake command to get that) but happy to share if helpful.

I think I also had to set a #define in opencv (latest) for openface to compile (something in traits.hpp)

couple of other notes -- setupsingleface() was missing some code for loading Haar I think, I copied some lines from setupmultiface to help.

@funkmeisterb
Copy link
Contributor

Hi Zach! Thanks for the heads up. I will work on this when I get the chance.

I did run different cmake commands for Debug/Release. It looked something like:

mkdir build_debug
cd build_debug
cmake -D CMAKE_PREFIX_PATH=/usr/local/Cellar/openblas/0.2.20_2 -D CMAKE_BUILD_TYPE=DEBUG ..

@ofZach
Copy link
Author

ofZach commented Jul 9, 2018

cool thanks!

it's working but def crashing out at some point -- I will poke around a bit, I feel there's some weirdness with the versions of dlib and opencv and/or something with threading... I didn't have much time to dig into it yet.

here I am raising my eyes and AU1 AU2 get larger :)

dhrkm5uwkaaosis jpg-large

@ofZach
Copy link
Author

ofZach commented Jul 9, 2018

ps requires more testing, but I found my crashing disappeared when I did this -- which makes a copy of the matToProcessColor

mutexImage.lock();
    cv::Mat rgb_image;
    matToProcessColor.copyTo(rgb_image);
    //cv::Mat rgb_image = matToProcessColor;
    cv::Mat grayscale_image;
    ofxCv::copyGray(rgb_image, grayscale_image);
    mutexImage.unlock();

see for example
http://answers.opencv.org/question/32415/thread-safe/

@funkmeisterb
Copy link
Contributor

Hey @ofZach, check out the new branch OpenFace_v2.0.3. It includes an HAAR single face fix, and contains the Debug & Release libs for OpenFace compiled with Boost 1.57, which fixes the action unit issue. I've also added the thread-safe material copy. I did get some weird crashes too and never figured out where that came from. Good catch!

I don't have the time now to do a proper integration of action units into the example (GUI toggle, drawing), but if you look at FaceLandmarkVidMulti.cpp from the OpenFace examples, you can probably figure it out, as my code uses a lot of that logic. I've also noticed that the single face example doesn't do action units, and it would probably be good to do it in the OF integration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants