Face Detection Using Dlib and DNN in OpenCV

Face Detection Using Dlib and DNN in OpenCV

Face detection is one of the most fundamental aspects of computer vision.

We’ll use:

Frontal face detector dlib: Dlib is a C++ toolbox for employing machine learning techniques to solve real-world problems. Despite being built in C++, it includes Python bindings executed in Python. The dlib frontal face detector extracts feature using Histogram of Oriented Gradients (HOG) and then processes using an SVM.

Caffe model with DNN from OpenCV: The Caffe model is based on the Single Shot-Multibox Detector (SSD) that uses the ResNet-10 architecture. It was added to OpenCV’s deep neural network module after version 3.3.

After we have worked with both, we’ll compare them to see which one performs better for different examples. Let’s get started!