Dlib is a popular library. It can be used for face detection or face recognition. In this article I will use it for facial landmark detection. Facial landmarks are fecial features like nose, eyes, mouth or jaw. Start with installing Dlib library. Dlib requires Lib Boost. sudo apt-get install libboost-all-dev Now we can install Dlib. sudo pip install dlib Following example uses PIL and numpy packages. Instead of Pillow it is possible to use skimage package. pip install Pillow pip install numpy Note that in order to detect facial landmarks, a previously trained model file is needed. You can download one from Dlib site. Download model file from this link : http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2 After download is completed, extract the archive and make sure its location is correctly referenced in the source file. The application first tries to detect faces in the given image. After that for each face it tries to detect landmarks. For ...
Software Engineering experiences and best practices