Before finding out how face recognition works, let’s find out how good are you at recognizing faces. Can you identify the age and gender of the people in this image?
Yes, you can! You can identify that there are 3 males and 1 female in the photo. You can also perhaps guess their age (we believe you can. STEMpedians are smart B)).
But can a machine recognize if there are any faces in the image and guess their gender, age, and emotion?
In this lesson, we will see how face detection and face recognition works. Let’s dive in!
At the end of the lesson, you’ll be able to:
Let’s begin!
In the past few years, face recognition has become one of the most promising applications of computer vision. Face detection can be considered to be a substantial part of face recognition operations.
The method of face detection in pictures is complicated because, well, human faces are widely different from one another! They can have different poses, expressions, position and orientation, skin color, have glasses or facial hair or not, etc. Then are also differences in camera gain, lighting conditions, and image resolution.
There are a few methods that you can use to detect face such as
The knowledge-based method depends on a set of rules and is based on human knowledge to detect the faces.
E.g. A face often appears with two eyes that are symmetric to each other, a nose and a mouth.
Feature-based detection uses what are known as face landmarks to detect faces.
By default, there are 68 predefined landmark points. The following image shows all landmark points:
The feature-based method detects faces by extracting the face landmarks of the face.
STEP 1: Download the Pictoblox Installer (.exe) for Windows 7 and above (Release Notes).
STEP 2: Run the .exe file.
Some of the device gives the following popup. You don’t have to worry, this software is harmless. Click on More info and then click on Run anyway.
STEP 3: The rest of the installation is straightforward, you can follow the popup and check on the option appropriate for your need.
Your software is now installed!
STEP 1: Download the Pictoblox Installer (.deb) for Ubuntu (Linux) (Release Notes).
STEP 2: Run the .deb file by clicking it or with the following command:
$: sudo dpkg -i PATH_TO_PICTOBLOX
STEP 3: Add User to the ‘dialout’ group (if not able to connect to the Serial port) with the following command:
$: sudo adduser ${USER} dialout
Your software is now installed!
Select the link according to your Android Version:
Install from App Store
The Face Detection extension in PictoBlox has blocks dedicated for face detection.
Let’s first add the extension in our project:
The stage is set. Click the green flag to get the camera feed on the stage.
Now we will write the script for each face detected.
You have to delete the clones or the square box every time you draw new squares. Otherwise your stage will get filled with unwanted clones. Here is how you can do that:
Your script is now complete. Click the green flag to start the script.