Face Detection and Face Recognition: let’s see the differences
Have you ever thought about how your phone unlocks through facial recognition?
What if I told you that this is the same technology that is used by most cameras, smartphones and computers today?
In this article, we’re going to talk about one of the technologies that is all over the world and are said to reach $8.5 billion by 2025. Today, we are going to talk about Face Detection and one of its most important applications: Face Recognition.
The text you’re going to read is not for the more experienced, so get ready because now we’re going to go over what Face Detection and Face Recognition is, how they work andsome of their real-world applications.
Facial Detection vs Facial Recognition
As a novice in the industry, it may be that at least once you too have wondered, “But are Face Detection and Face Recognition the same thing? If not, what differentiates them?”.
As much as the answer to this question can already be found in the names of these two technologies, it’s best to go deeper into the two topics.
So let’s proceed one step at a time and get to the bottom of it:
What is Face Detection technology?
You know that we, as humans, can recognize something just by looking at it? Why are we able to do that? We do it automatically, but it’s something we’ve learned since childhood.
Surely if I give you a picture of a person, I’m sure that in a short time you would be able to tell me what are the parts of the body that you see in a picture.
Here’s this example to help you understand what facial recognition is. This Artificial Intelligence technology can recognize people’s faces when given an image or video.
As of today, real-world applications are increasing thanks to more research in the field and thanks to the emergence of new algorithms that are increasingly accurate. We go from simple facial recognition to eye tracking to figure out how long a person stands still looking at a store window.
But let’s be careful!
Facial recognition, yes, can recognize people’s faces but it doesn’t do it the way we do it (or at least, the way our brains do it).
Let me explain.
How does Face Detection work?
The technology we’re talking about is achievable in several ways, some of them are older others are newer, more accurate, and faster at detecting people’s faces.
The basic idea behind Face Detection algorithms is the detection of certain characteristics of the human face.
Think about it, what is the first thing that comes to your mind if I tell you to describe a person’s face?
I bet you thought of eyes, didn’t you? That’s what a Face Detection algorithm also does, i.e., it analyzes the image until it finds a common feature in human faces such as the eyes, then moves on to the nose, mouth, and facial contours.
The algorithm does this automatically by analyzing the entire image pixel by pixel and finally, it combines these features of the face to predict it. This is one of the methods and it is called the Feature-Based Method.
But it doesn’t end here.
What I’ve described to you is the idea, but to implement this kind of method you first need to train your face recognition algorithm with quite a few images. Images where there are not only faces but also buildings, landscapes, etc.
Only in this way we could have an algorithm that works and is effective at the same time.
Face Detection algorithm: Haar Cascades
However, thanks to the continued research by the most experienced Computer Vision people there are many algorithms that have come out in recent years, some more promising and accurate than others.
The most popular of these is the Haar Cascades, this is a sub-version of Viola and Jones “boosted” algorithm for rigid object detection. The Haar Cascades is not one of the newest, but it is a good basic algorithm and is one of the fastest.
Also, the Haar Classifier can be used easily thanks to its presence in the OpenCV library.
But how exactly does it work?
This algorithm uses the so-called “ Haar Feature “, which are 5 rectangles that are used to identify the features of a face.
Thanks to this method, the algorithm can identify facial features using the slide window technique, i.e. a technique that allows you to slide a window (or rather a square) on the image to allow the algorithm to analyze one section of the image at a time.
To better understand what I’m saying, I suggest you watch this video:
I don’t want to go into details, especially the mathematical ones because this article aims to make you understand the basic idea, and not to analyze algorithm per algorithm (if you want to deepen I can refer you directly to the paper).
The Haar Cascade is one of the most popular in the Face Detection field, but it is not the best. In fact, many other newer algorithms many algorithms have performed better than the one described, some examples are MTCNN, FDNet, RetinaFace and TinaFace.
Now that you know what Face Detection is and how it works we can move on to the next step and then go to understand Face Recognition.
What is Face Recognition technology?
Does the name sound familiar?
It sounds familiar because you almost certainly use this technology to unlock your smartphone. Well, then let’s waste no more time and see what it is and how it works, in a brief.
Facial recognition is one of the applications of Face Detection. I told you at the beginning that both were related, here’s why.
Let’s just say that without Face Detection, this technology couldn’t exist.
The basic concept is more or less the same but not the same, face recognition is a little bit more sophisticated and it is not to be confused with Face Verification of which we will see the difference later.
How does face recognition work?
Surely, it is much easier for us to recognize a person we have already seen somewhere. Maybe we can even describe their eye color, hair color, etc.
But it’s not the same for face recognition. This technology uses geometry and mathematical formulas to recognize a person, how?
First of all, this technology transforms a person’s face into an array of data, called “ Encoding “. This data is transferred within a database and is associated with the subject.
Once the algorithm has placed this data inside the database, it will be able to recognize it when it sees the same face in a photo or video.
Okay, but how exactly?
The algorithm can store the face by taking into account geometric shapes. That is the distance between the eyes, the angles that can be found in a face, the roundness and many other aspects.
All these data are stored to make them accessible when you will try to recognize a face.
Read also: A wonderful tool for Computer Vision: OpenCV
Face Recognition vs Face Verification
Again, the basic idea is the same, but there is one major difference between the two.
With a Face Recognition system, you can identify multiple faces. For example, some offices have this system to recognize their employees and allow them access. So it is a one-to-many system, meaning with one system you can recognize multiple faces if they are already stored in the database.
Whereas Face Verification is a 1:1 technology, so it can only tell you if that face is of a certain person or not. The most common example is Apple’s Face ID or face verification of other Android smartphones.
Face Recognition ethical issues
A facial recognition system is very useful in today’s world many countries like China and some organizations like the FBI, use facial recognition systems to monitor or detect criminals.
It’s a really useful system, but with some privacy concerns.
Let’s take the example of cities. It certainly makes them safer but since this system is installed in all streets to maintain security, citizens have less privacy.
Consider that you could use this technology to spy on the entire movements of a single citizen, violating their freedom. Moreover, your face is collected without your permission and the collected image could be used for other purposes.
Privacy is one of the biggest problems with the implementation of these technologies, a problem that I think we will struggle to solve, but in the meantime, we can enjoy the benefits of facial recognition, let’s see some of them.
Some real-world applications are:
- Increased security in cities and airports
- Marketing: you can use these technologies to know how much time a person spends looking at the window of our store
- Social Media: face recognition is used to create filters, an example is that of Snapchat
- Unlock smartphones or safes
- Healthcare: you can monitor patients so you can intervene immediately
- Recognize if the driver is looking at the road or is on the phone
Those listed above are just some of the key examples of this technology and you could almost certainly add more to the list, they are also reasons why Face Detection is important today.
I hope this article has been helpful to you in understanding the topic we’ve talked about so far, remember you can always write in the comments if you’re unclear about something or maybe you want some more in-depth articles.
Until next time,
Originally published at https://www.antoniofurioso.com