This device is not compatible.

PROJECT


Face Detection Using Dlib and DNN in OpenCV

Face detection is a computer vision task that allows a program to detect a human face in a photo or video. Face detection can help embellish selfies and portraits or produce virtual avatars from a user's photo. In this project, we’ll learn to detect the faces in a photo using dlib and DNN in OpenCV.

Face Detection Using Dlib and DNN in OpenCV

You will learn to:

Display images using Python

Use Resnet10-SDD-300x300 in OpenCV

Use HOG-based face detector from dlib

Detect and plot face boundaries in an image

Skills

Data Visualization

Data Manipulation

Machine Learning Fundamentals

Prerequisites

Basic understanding of Python

Basic understanding of data analysis

Basic understanding of data visualization

Technologies

Python

OpenCV

Project Description

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!

Project Tasks

1

Preparation

Task 1: Import Necessary Libraries

Task 2: Download and Visualize the Image

2

Face Detection Using resnet

Task 3: Load the DNN Network

Task 4: Prepare the Image for the Network

Task 5: Running the Network

Task 6: Label and Visualize the Image

3

Testing Your Solution

Task 7: Getting Model Results

Task 8: Performance Test

4

Face Detection Using dlib

Task 9: Convert the Image to Grayscale

Task 10: Run the Detector Using Dlib

Task 11: Label the Image and Visualize the Result

5

Testing Your Solution

Task 12: Getting Model Results

Task 13: Performance Test

has successfully completed the Guided ProjectFace Detection Using Dlib and DNN in OpenCV

Relevant Courses

Use the following content to review prerequisites or explore specific concepts in detail.