Face Landmarking Using Dlib

Let’s learn to extract face landmarks using the Dlib Python library.

Introduction to face landmarking

The faithful identification of facial features and landmarks constitutes a rudimentary process and a foundation for a wide range of more advanced computer vision tasks, such as facial recognition and facial expression analysis.

At their highest level, the facial landmarks are regarded as a set of key points, generally located on the corners of the main facial components. By leveraging computer vision techniques, the detection of face landmarks can be used for a lot of applications, including the following:

  • Extraction of face parts (that is, nose, eyes, mouth, jawline, and so on)
  • Alignment of faces
  • Swapping of faces
  • Detection of blinking eyes
  • Detection of drowsiness

Objective

This lesson will present the Dlib Python library and will help to visualize 68 face key points. The inner algorithms of this robust library will allow us to detect several features of the human face. The facial landmark detector of this library will return a map composed of 68 points known as landmark points that surround each of the face features, as seen below:

Get hands-on with 1200+ tech skills courses.