...

/

Face Landmarking Using Mediapipe

Face Landmarking Using Mediapipe

Let’s learn to extract facial landmarks using the MediaPipe Python library.

Introduction

We explored the Dlib 68-point facial landmark detector, which is considered one of the most ubiquitous detectors in the computer vision field due to the speed and reliability of the Dlib library. However, other facial landmark detection models have emerged.

In this lesson, we’ll present an overview of the Face Mesh solution from MediaPipe, which is capable of computing a 3D face mesh and estimating 468 face landmarks, as exhibited below:

What is Mediapipe’s Face Mesh?

MediaPipe provides a face geometry solution that can estimate 468 3D face landmarks in real time even on mobile devices. To infer an approximate 3D surface geometry of a human face, Face Mesh utilizes several ML algorithms.

MediaPipe’s Face Mesh consists of these two deep neural network models that work together:

  • The first model is the detector that determines face location.

  • The second model works on the detected face location and predicts an approximate face geometry.

Advanced applications of facial landmark detection

Several applications rely on facial landmark detection technology. Some examples are as follows:

  • Face animation and reenactment ...