Facetracker2 model loading error

Hello guys,
I run the sample(simple) of facetracker2 but it cant load the model successfully.
I put the training data( shape_predictor_68_face_landmarks.dat) to the folder(bin/data) that manual asked.
But always pop up the error as below
[ error ] ofxFaceTracker2: shape_predictor_68_face_landmarks.dat data file not found at /Users/ll33457791/of_v0.11.2_osx_release/apps/myApps/facetracker2test2/bin/facetracker2test2Debug.app/Contents/Resources/…/…/…/…/src/…/…/model/shape_predictor_68_face_landmarks.dat.

Did anyone has same problem?

Thank you all

can you share the file path of your .dat file?
sounds like it’s data/shape_predictor_68_face_landmarks.dat when it should be data/model/shape_predictor_68_face_landmarks.dat

Thanks for replying

So,my path of .dat would be
bin/data/shape_predictor_68_face_landmarks.dat. of my app

And to be honest,I tried put the .dat to every where that I can access but still error

something seems a little strange with the path for the dat file


can you include the src code, or just where you call “setup” on the face tracker object?

other thoughts, can you add this to your code at the top, so it’s possible to see where the app thinks it is located


also can you make sure you are not running OF in a folder that’s either using iCloud sharing and/or dropbox? both services tend to put larger files online dynamically and can lead to some tricky issues with compiling, etc.

ah I misread this, you are running the simple app, are you running it from within the addon folder?

one note is the examples are looking for the model folder, they include this line of code which changes where the data folder is


this means they are pointing to this folder:

however if you move this example code somewhere else, it may not work. You can try commenting out the ofSetDataPathRoot line and putting the model in the data folder (or data/model)

Sorry for late response.
Cuz I create the project from projectgenerator and the root for
ofSetDataPathRoot(ofFile(BASE_FILE ).getEnclosingDirectory() gonna be project/src
So I deleted the “…/…/model/” from code and put the .dat into it and it works!

Thanks all