/* This example program shows how to find frontal human faces in an image and estimate their pose. The pose takes the form of 68 landmarks. These are points on the face such as the corners of the mouth, along the eyebrows, on the eyes, and so forth. This face detector is made using the classic Histogram of Oriented Gradients (HOG) feature combined with a linear classifier, an image pyramid, and sliding window detection scheme. The pose estimator was created by using dlib's implementation of the paper: One Millisecond Face Alignment with an Ensemble of Regression Trees by Vahid Kazemi and Josephine Sullivan, CVPR 2014 and was trained on the iBUG 300-W face landmark dataset. Also, note that you can train your own models using dlib's machine learning tools. See train_shape_predictor_ex.cpp to see an example. Finally, note that the face detector is fastest when compiled with at least SSE2 instructions enabled. So if you are using a PC with an Intel or AMD chip then you should enable at least SSE2 instructions. If you are using cmake to compile this program you can enable them by using one of the following commands when you create the build project: cmake path_to_dlib_root/examples -DUSE_SSE2_INSTRUCTIONS=ON cmake path_to_dlib_root/examples -DUSE_SSE4_INSTRUCTIONS=ON cmake path_to_dlib_root/examples -DUSE_AVX_INSTRUCTIONS=ON This will set the appropriate compiler options for GCC, clang, Visual Studio, or the Intel compiler. If you are using another compiler then you need to consult your compiler's manual to determine how to enable these instructions. Note that AVX is the fastest but requires a CPU from at least 2011. SSE4 is the next fastest and is supported by most current machines. */ |
|