Face recognition is a method of identifying or verifying the identity of an individual using their face. Face recognition systems can be used to identify people in photos, video, or in real-time. In python face_recognition is a command line tool that lets you do face recognition on a folder of images from the command line. Through the face recognition module, we are able to read the images from the desktop and identify the images through technique called face encoding. For face recognition to be successful the algorithm notes certain important measurements on the face like the color and size and slant of eyes, the gap between eyebrows, etc. All these put together define the face encoding the information obtained out of the image that is used to identify the particular face and that’s the reason why we settle for face encoding after loading the image from the dataset.
To make it more interesting, machine learning algorithm was adopted where the camera captures instantaneoulsy and gives the prediction. Machine learning plays a pivotal role in this part. In the first step, we have to install some libraries so that our program works. Given below is a list of the libraries that we will install: cmake, face_recognition, numpy, opencv-python. The following libraries will be important CMake To install CMake, visit cmake.org/download/ and download the appropriate installer for the machine. The Cmake file is the installed. While installing CMake, add CMake to the system PATH environment variable for all users or the current user so it can be found easily. after the installation is complete, open a terminal and execute cmake. This should show the usage for CMake. If it did not, make sure you selected the option to add it to the PATH environment variable. Visual Studio is installed incase of a windows operating, system. OpenCV OpenCV is the huge open-source library for the computer vision, machine learning, and image processing and now it plays a major role in real-time operation which is very important in today's systems. By using it, one can process images and videos to identify objects, faces, or even handwriting of a human. In our case, opencv-python is going to be installed. The library has more than 2500 optimized algorithms, which includes a comprehensive set of both classic and state-of-the-art computer vision and machine learning algorithms’ which is going to be essential for our project. Having satisfied all those requirements, face recognition library is installed by executing from the terminal. The next step will entail creation of a library that will contain our data set. The images are going to be stored in a folder. The image will first be loaded from the library and using the face encoding the system will be trained how to recognize the model. For face recognition, the face encoding algorithm notes certain important measurements on the face — like the color and size and slant of eyes, the gap between eyebrows, etc. All these put together define the face encoding, the information obtained out of the image, that is used to identify the particular face. In the library we had images of Biden, Obama, Fatima and Mariam. All the images are going to be encoded and an array of their names created.