Help us understand the problem. What is going on with this article?

dlib の顔認識を試す

More than 3 years have passed since last update.

概要

dlib と CLM-framework について解説している記事 "Facial Landmark Detection" を参考にして dlib をコンパイルし、デモの webcam_face_pose_ex を動かします。

自分の環境で上手く行かなかった部分についてまとめます。

環境

OSX El Capitan (10.11.2)

準備

X11

XQuartz から XQuartz-2.7.8.dmg をインストールします。

dlib のコンパイル時に fatal error: 'X11/Xlib.h' file not found のエラーが出たので、シンボリックリンクを貼ります。

ln -s /opt/X11/include/X11 /usr/local/include/X11
http://stackoverflow.com/a/12089021/1567777

dlib のコンパイル

git clone https://github.com/davisking/dlib.git
cd dlib/examples
mkdir build
cd build
cmake .. 
cmake --build . --config Release

10分くらいかかったので、CMakeLists.txt から必要ない add_example を消すと良いと思います。

CMakeLists.txt
add_example(3d_point_cloud_ex)
...
add_example(xml_parser_ex)

ここまで消す

モデルファイルの用意

http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2 をダウンロードして examples/build/shape_predictor_68_face_landmarks.dat に解凍します。

実行

./webcam_face_pose_ex

結果

スクリーンショット 2015-12-17 18.06.54.png

めっちゃスゴい。

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away