分享

dlib C++ Library

 黄建校 2015-12-07
/* 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. */

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多