Facial Recognition Using AI

Aliza Ahmad
5 min readMay 21, 2021

--

Everyday, we see strangers. People we don’t know, at the grocery store, or even just random people on the street. It may be a small interaction, a wave, or just a glance. We don’t tend to remember these faces, but what if we had a computer system able to recognize these faces and identify them?

This is called a facial recognition system, and I’m going to show you how I built one.

So what is Artificial Intelligence (AI)?

Put simply, Artificial intelligence (AI) refers to the simulation of human intelligence in machines that are programmed to think like humans or mimic human actions.

There are 100s of applications of AI today. Artificial Intelligence has made a booming impact on multiple industries such as healthcare, architecture, and retail. Many of these industries already implement AI in ways you don’t notice, and will continue to disrupt industries in the near future.

Application of my AI

As I mentioned before, there are hundreds of ways AI can be applied in the real-world. My technology focuses on a specific application of AI, which is security and facial recognition. This project can be applied through crime prevention and security welfare.

Facial recognition has already been proven to improve safety and security. It’s been implemented for this reason in many places such as airports, which have had security screenings for many years. Facial detection & recognition comes in use this way by identifying potential threats, and recognizing people who are wanted criminals.

I’ll talk more about how my technology can be applied later on, but for now, let’s get into how I built my facial recognition system.

How I built it (simplified)

Here is a brief overview of how I built it in 3 easy steps.

Step 1: Sample Images 🤳🏽

The first step in creating an AI that’s able to recognize faces, is to provide the system with sample images. This can be just about any picture of any face.

To get the most accuracy, it’s important to choose images where the person is looking and facing straight at the camera. (this allows the computer to recognize distinct features), and be sure to name the images with the person’s name when saving them.

With sample pictures, you’re essentially training your computer to identify faces and memorize them incase it sees that face again.

Step 2: Coding the Frames 🖼

The next step of creating this AI is coding the frames. This is a crucial part of completing this project because it’s what allows you to see that this facial recognition system is actually working.

When making a frame, the computer is able to spot and place a box around any face it identifies. After it detects that there are faces in the frame, it will put a label under it and you will see the name that corresponds with the image.

Step 3: Display Results 🔍

The last step in creating this AI is to display the results. First, the AI will draw a box around the identified face. After that, it’ll name the face the same name of the image that corresponds with it.

However, if we don’t have a sample image for this face, the computer will not know how to identify it, and therefore, a text with the word “Unknown will appear instead.

Here is an example of what this might look like.

Facial Recognition System Labelling Leonardo DiCaprio as “Unknown”

So how does this work? 🧐

How is it able to recognize or detect a face in the first place?

Put simply, the computer is able to locate specific points on the face. For example, being able to identify the tip of the nose and the corners of each eye to create a mask. After it does this, if the points of the face match with a sample image, the name of the person will be displayed. If not, the computer will label it as unknown.

Facial Recognition System Identifying Bill Gates

How it can be used in the real-world 🌎

There are many applications of this tech in the real-world. I mentioned this before, but here is a little bit more about how this can be applied.

One important way this tech can be applied is for security. Face recognition is being used to identify when known shoplifters enter places. Photographs of these individuals can be matched against criminal databases, and security professionals can be notified when a threat enters the store.

Another way face recognition can be applied in the real-world is to find and identify missing people. Face recognition enables law enforcement to have a reference photo, and if that photo matches a missing individual through security cameras, this can accelerate their efforts in finding them. Similarly, this technology can be used to support investigation and identify people for relevant information.

I hope you found this article useful, and you were able to learn more about facial recognition and its applications!

--

--

No responses yet