close

Face Detector Comparison on a Resource-Constrained Device

All

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

September 27, 2024

by Newsdesk Fri 27 Sep 2024 at 05:39 Global industry supplier Konami Gaming is set to unveil new technology at Global Gaming Expo (G2E) in Las Vegas next month that brings its player facial recognition solution for Electronic Game Machines to table games. The expanded offering, in partnership with Xailient, follows the launch of SYNK Vision […]

July 13, 2024

NEWS PROVIDED BY Xailient Inc  Nov 05, 2023, 22:24 ET Konami Gaming and Xailient partnering to replace magnetic player tracking cards with facial recognition technology at slots and tables for the casino industry LAS VEGAS, Nov. 3, 2023 /PRNewswire/ — Konami Gaming, Inc. and Xailient Inc. announced a strategic partnership to introduce SYNK Vision™ to the casino industry. This revolutionary collaboration […]

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