Facial Recognize in Python

An easy and smart way to recognize human face

Guilherme de Lima Barros
The Startup

--

In this article I will explain some important concepts in image processing, and also provide an easy recognition project made in Python using Cv2 and DLib libaries, in addition to explaining each step.

Region of Interest

One of the most important concepts in facial analysis using images, is to define our region of interest (ROI), we must define in our image a specific part where we will filter or perform some operation. For example, if we need to filter the license plate of a car, our ROI is only on the license plate. The street, the body of the car and anything else that is present in the image is just a supporting part in this operation. In our example, we will use the opencv library, which already has supported to partition our image and help us identify our ROI.

Haar Library

In our project we will use the ready-made classifier known as: Haar cascade classifier. This specific classifier will always work with gray images. This library works as follows.

Original Photo by George Desipris on Pexel — Edited by Author

--

--

Guilherme de Lima Barros
The Startup

Full Stack Engineer | Master at League of Legends | Drum Enthusiast.