How does facial recognition work?

What is facial recognition? 💻

Facial recognition is software that can identify a person by their unique features. It does this by comparing it to predefined aspects of the person termed “data sets”.

Source: digileaders

How does it really work? 🤔

#1 Is there even a face?

We first have to understand the difference between detection and recognition. With detection, it will simply tell you if there is a face or not, like binary. This is commonly used in public spaces as having datasets on each individual can be intense.

#2 Comparing the picture

By analyzing the 80+ distinguishable points on the human face, we can create a unique code for that specific person, think of it as an ID! Some devices like flagship smartphones use technology such as Lidar or Light Detection And Ranging, a specific component added to the phone. By including Lidar, you get many more data points than a traditional camera. It measures depth, creating a hyper-secure system, compared to others being fooled by a printed picture of the owner!

#3 Making the match

We now try and match the subject to the correct database. It used to take hours, and even days to go through all the different datasets of people, but with recent breakthroughs, we have gotten the process down to 10s in just seconds! Industry-standard is now 25 images per second, making real-time video a serious option.


What is YOLO

As mentioned earlier, YOLO is an acronym for You Only Look Once. It is a type of Artificial Intelligence-based facial recognition software, and it works completely different than anything we have seen before! Based on the very popular coding language, python, it has a low entry barrier, and even I will be creating my own software for it!

Why YOLO is the most popular

YOLO is by far the most popular and widely used application for object detection and recognition, its fairly straight forward to set up, but the actual process is pretty complex and interesting 🤯

The complexity behind it

The first thing YOLO does is to divide and conquer. It splits the image given into a 13x13 grid of cells. However, the size of the 169 cells does vary depending on the size of the input. For example, OpenCV did an experiment with a 416x416 input size, and the cell-sized came out as 32x32 meaning the scale will fluctuate, but the aspect ratio will stay the same. It then predicts bounding boxes and the probability of the machine getting it right, typically if it is under 50%, the box will not appear to keep accuracy consistent.


Facial recognition is a very powerful application of AI, and it will only grow more into everyday usage.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store