How Does A Computer Detect A Face?

in #science8 years ago (edited)

Facial detection technology is still in it's infant stage but has improved dramatically over the last 16 years. It is still in most cases inaccurate, but can have numerous applications for for our daily lives! But how does a computer recognize our faces?

enter image description here
Image Credit:

Please note that in this post I will discuss a simple algorithm to understand how a computer can Identify an object as an face. There are more mathematics and gory algorithms to detect it, but I will keep it really simple for the average Joe reader

How a computer can detect an object as a face.

We humans are extremely good at detecting faces, in fact we are still better and faster than computers at this task. We have evolved to identify someone's state of emotion, where he looks and if something has a face! This is amazing because a face has a lot of variables and is ever changing. We can even identify a face that has grown old. One the biggest problems we faced with facial recognition is identifying an object as a face. We still have problems with that. We are at an advanced level with that. We can see faces in simple objects like a smiley or car like in the image down below.

enter image description here
Image Credit

But how does a computer detect a face when it only sees bits of number like this:

enter image description here
Image Credit

we are luckily good at seeing patterns, computers are also good at recognizing patterns. We have noticed patterns of how lights fall on a face. For example: The middle of one's nose is usually lighter than the sides like this:

enter image description here
Image Credit

We can make a simple diagram to illustrate this light, dark effect of the nose:

enter image description here
Image Credit: My own work

the same principle happens with the eyes:

enter image description here
Image Credit:

and the simplified diagram would look something like this:

enter image description here
Image Credit: My own work

we can find similar patterns like the ones above all over the face. This patterns or similarities could be used to determine if an object has an face. There are three main steps to do this.

The first step is to change the original picture's colour into a gray scale version of the picture, like this:

enter image description here
Image Credit

The second big step would be to divide the picture up in squires and let the program compare the dark and light ratio with that of the basic diagrams like this:

enter image description here
Image Credit

The final part would be to mark this location of the face part, and render a square around the face like this:

enter image description here

Image Credit

As mentioned above, our algorithms have improved significantly the last decade. This was a short and simple explanation of one of the oldest and widely used algorithm.

*What do you think? let me know in the comments down bellow. Upvote and follow me if you liked what you read?

Note : I was on a hiking trip this weekend. I will post photos of the trip soon. This is why I did not post anything this past week! This post is not of high quality but I am posting it to show I am alive! Better posts will come soon! Sorry for not notifying any of my followers about this trip. I want to thank everyone sticking to my account!

And as always

Thanks for reading!


Liked what you read? Find more and follow me @stormblaze Here and once again upvote, comment!


enter image description here
Image Credit: My own work!

Sort:  

Thanks for your short and simple explanation of one of the oldest and widely used algorithm. Hope you will write more and more interesting posts.

Cool, didn't know this, thanks.

Glad I could share something interesting! Thank you for your comment!

very, very interesting; I often thought about that and never googled it ;-)

Thank you @pery, I really appreciate your response!

Great to find a post again but do not rush it! But looking forward to your new posts! You always make good ones and I think your flowers will drop you that easily!

Thank you @stardust I really appreciate your support, sorry for the under quality post! My posts will improve and as I have stated above, This is just to show I am still here. Thank you for your comment @stardust!

Very clear explanations! Thanks for sharing!

Very interesting post!

Great post as an introduction to computer vision.
Just I want to clear something out, the reason why in this algorithm and other simple computer vision algorithms we use gray-scale is because it's easier that way.
When you have a gray-scale image, you can easily represent that image as a 2-dimensional array of numbers, which represent each pixel and the tone of white (or light) for each pixel (for example, 0 is black and 1 is white).

When you have a color image, the most common representation is as a "RGB" (Red-Green-Blue) image, which has to be represented as 3 different 2-dimensional arrays that represent the amount of each color for each pixel of the image, which complicate the things a lot.

But that doesn't mean that all algorithms see images in gray-scale, there are algorithms that use color, but when possible, we try not to over-complicate ourselves.

Yeah, there are several ways to make the computer distinguish between objects and faces, it will be difficult for a non-professional to understand such information from scratch. Part of my project is based on computer vision. Therefore, I was looking for a contractor with expertise. We have been working with the guys from Sloboda Studio for several months and are very satisfied with today's result.

Coin Marketplace

STEEM 0.15
TRX 0.16
JST 0.028
BTC 68750.43
ETH 2428.97
USDT 1.00
SBD 2.37