I’ve been playing around with Kyle’s ofxFaceTracker addon and really like what it’s capable of, but there are a lot of faces that don’t register (for instance: beards).
I was talking with Zach about this and he recommended checking out dlib’s face tracking capability. A quick write-up on that one here:
Anyone out there have experience using the dlib face tracking with oF? Or even just general gotchas about dlib+oF? I’m tempted to dive in but my C++ skills are not that advanced so feeling a bit intimidated.
regarding what I told you about, please ping me in a week, I should have something to share… (it uses dlib to find the faces via HoG, but the tracking is a separate library). It’s a very large thing at the moment since it uses a ton of compiled libs / dylibs / etc and it kind of unwieldy / hard to share, I need to clean it up and find a way to put it online… probably takes me a week (or two) since I am traveling.
The tricky part with DLib is to add the correct includes. But once you figure it out it is very straight forwards.
In this example we are not opening new windows, although it might complain if you dont have xQuartz installed.
Let me know how it goes.
BTW, I just started an addon for using DLib inside OF projects, inspired in the way that ofxCV deals with different data types, wrappers, etc. I should be pushing it to github anytime soon.
@andydayton@stephanschulz Ohh that’s odd. I’m using osx 10.9.5 and OF from github, pulled recently.
by looking at that error message I’d say that the libfmodex.dylib should be in the same directory as the executable, hence DLibTest.app/Contents/MacOS/
move try moving the fmodex file so it is in the same folder as the executable.
If not, you can try making a new project and add the dlib stuff. It´s actually quite easy, you just need to add the path to the dlib folder (this path must be to the folder containing the dlib folder, not the dlib folder itself). add it to the “user include search path”. take a look to my project to get the idea.
If you want to avoid the gui and windowing part of dlib you need to add #define DLIB_NO_GUI_SUPPORT
to the dlib/all/source.cpp file. also comment out from the ofApp.h file.
If you actually want the dlib gui and windowing you need to add the path to the X11 stuff.
Make sure that you add to your project the dlib/all/sources.cpp file.
I think that that is all. Let me know how it goes.
And replaced @executable_path/libfmodex.dylib with ./libfmodex.dylib. (Not sure how it got that way but this is what it’s set to in the 0.9.0 emptyExample project).
This article explains a little bit about what install_name_tool is doing.
ALSO I ran into a runtime error once I resolved that issue giving me an EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) error thrown in one of the dlib source files.
I you run into this, I fixed it by going to Project Settings -> Build Settings -> “APPLE LLVM 6.1 - Code Generation” and changed the value of “Enable Additional Vector Extensions” from “AVX” to “Platform default”.
Thanks @stephanschulz for letting me know that. I’ll make all the fixes mentioned here later.
When I was doing this test I started a sort of addon for dlib very much in the style of ofxCv. but left it aside. Is this something worth working on? what do you guys think?