Posts

Showing posts from April, 2020

Face Detection: Haar Cascade vs. MTCNN

Image
Face Detection: Haar Cascade vs. MTCNN One of the most important things in a face recognition system is actually detecting the faces in an image. Right? Without the faces, you can’t really do any downstream tasks of person classification, gender classification, emotion classification, and so on. If you’re a Computer Vision practitioner, you’re probably familiar with OpenCV, a python’s open-source package to perform a variety of computer vision tasks. Within OpenCV, there’s a popular face detection module, which utilizes the technique called Histogram of Oriented Gradient (HOG). You can read more about HOG   here . But basically, the technique trains a cascade function (boxes of shapes) that appears in images with faces, and learns the general pattern of a face through the change in colors/shadows in the image. In the original paper, the author claims to have achieved 95% accuracy in face detection. Now comes Deep Learning.
Image
A full guide to face detection Tutorials  In this tutorial, we’ll see how to create and launch a face detection algorithm in Python using OpenCV. We’ll also add some features to detect eyes and mouth on multiple faces at the same time. This article will go through the most basic implementations of face detection including Cascade Classifiers, HOG windows and Deep Learning. We’ll cover face detection using : Haar Cascade Classifiers using OpenCV Histogram of Oriented Gradients using Dlib Convolutional Neural Networks using Dlib Introduction We’ll be using OpenCV, an open source library for computer vision, written in C/C++, that has interfaces in C++, Python and Java. It supports Windows, Linux, MacOS, iOS and Android. Some of our work will also require using Dlib, a modern C++ toolkit containing machine learning algorithms and tools for creating complex software. Requirements The first step is to install OpenCV. Run the following command line in your terminal :