Expand Facial Features

Let’s learn to expand the eyes and lips in a facial image.

Introduction

Looking at someone’s face, we first notice the color, size, and form of their eyes and the shape of their lips. Digital photo enhancements, like expanding the lips or the eyes, can lend a professional and polished look to your photos. This lesson will teach us how to exaggerate facial features in digital images.

Objective

This lesson goes through the steps needed for developing a lightweight utility written in the Python programing language that can make our eyes and lips look bigger in digital photos without appearing unnatural.

Dependencies

We’ll be using the following external Python libraries.

Library

Version

mediapipe

0.8.9

opencv-python

4.4.0.46

numpy

1.19.4

filetype

1.0.7

Let’s code this utility!#

Let’s take a look at the main functions of this utility.

The remove_black_border function

As its name implies, this function removes the black borders around a chosen image. Let’s examine this function.

  • Line 2 computes the indices of
...