close

Face Detector Comparison on a Resource-Constrained Device

Face Detection

Face Detector Comparison on a Resource-Constrained Device

Sabina Pokhrel / December 23, 2020

Here we will run a face detector comparison between OpenCV Haar Cascade, Xailient Dectum, Dlib, and MTCNN Face detectors on a low-powered, resource-constrained device.

The face detector is one of the most commonly used AI components today. Whether you are building a system to count the number of people in a room or a home security system that unlocks the door when you reach your front door, you need a face detector.

Given an image, a face detector locates the faces present in the image and gives the coordinates of each face present in the image.

There are tons of face detectors that are available, and honestly, it might be quite overwhelming for you to decide which one would be best for your project. There is no one right answer.

The choice of face detector depends on the requirements of your project such as the available resources and target inference speed.

In this post, I will do a comparison of the four cutting-edge face detectors that are available today: OpenCV Haar Cascade, Xailient, Dlib, and MTCNN. I will also give code for each of the face detectors so you can either repeat the comparison or use it as a kick-starter for your project.

Face Detector Comparison

For the comparison between OpenCV Haar Cascade, Xailient, Dlib, and MTCNN Face detectors, I used a Raspberry Pi 3B+, with Raspbian Buster as the operating system. Test videos used for these experiments were downloaded from Pexels.com.

Here’s a video of comparison results for the four face detectors.

Real-Time Face Detection Comparison | OpenCV Haar Cascade, Dlib, Xailient Face Detector and MTCNN

Below are the scripts I used for running each of the face detectors.

OpenCV Haar Cascade

To set up, install the required Python libraries using pip command.

I used OpenCV version 4.1.0 for this experiment.

Here is the code for face detection using OpenCV Haar Cascade:

Dlib

To set up, install the required Python libraries using pip command.

I used OpenCV version 4.1.0 for this experiment.

Here is the code for face detection using Dlib:

Xailient

To set up, install the required Python libraries using pip command.

I used OpenCV version 4.1.0 for this experiment and installed the Xailient Face detector.

Here is the code for face detection using Xailient:

MTCNN

To set up, install the required Python libraries using pip command.

I used OpenCV version 4.1.0 for this experiment.

Here is the code for face detection using MTCNN:

Comparison Results

Here are the results from our face detector comparison, listing each in descending order of their performance (best is on the top of the list):

  1. Xailient Face Detector
  2. OpenCV Haar Cascade Face Detector
  3. Dlib Face Detector
  4. MTCNN Face Detector

Xailient Face Detector ran 16 times faster than OpenCV Haar Cascade Face Detector using only 1/4 of the resources with better qualitative accuracy.

Xailient Face Detector ran 80 times faster than Dlib Face Detector using the same amount of resources with similar qualitative accuracy.

Xailient Face Detector ran 80 times faster than MTCNN Face Detector using only 1/4 of the resources with similar qualitative accuracy.

Spread the love

About the Author

    Sabina is an AI Specialist and Machine Learning Engineer. She is a Writer and a former Editorial Associate at Towards Data Science.

Trusted by

Xailient’s commercial partners

Press releases

January 18, 2024

NEWS PROVIDED BY Xailient Inc.  18 Jan, 2024, 01:13 ET SYDNEY, Jan. 18, 2024 /PRNewswire/ — Xalient customer Abode, a leading provider of DIY smart home security solutions, has been recognized for their innovative new product, the Abode Edge Camera. Xailient AI runs inside the Abode Edge Camera, watching for anomalies like package deliveries or strangers on the […]

November 1, 2023

NEWS PROVIDED BY Xailient  25 Oct, 2023, 09:05 ET Wi-Fi HaLow™ Technology Enables Long-Range, Low-Power Connectivity for Smart Cameras SYDNEY and IRVINE, Calif., Oct. 25, 2023 /PRNewswire/ — Xailient, the leader in edge artificial intelligence (AI) for computer vision, today announced a strategic partnership with Morse Micro, a fast-growing fabless semiconductor company focused on Internet of Things (IoT) connectivity. Together, they […]

OnEdge Newsletter

A weekly newsletter with the best hand-picked resources about Edge AI and Computer Vision

OnEdge is a free weekly newsletter that keeps you ahead of the curve on low-powered Edge devices and computer vision AI.

 

You’ll get insights and resources into:

  • Edge computing use cases.
  • Market trends in Edge computing.
  • Computer Vision AI at the Edge.
  • Machine learning at the Edge.
Cookie Policy