

Hey, this is the first article I am going to write on medium so as you have seen the title this is about Face-Recognition so let’s get started.
You can check the code from my Github repo from here
well let’s start importing we need as you have guessed OpenCV(you can install it from there) and numpy as well as the most important one for this code face_recognition
Access the Webcam and load the sample images
Well we could use the webcam using VideoCapture(0) from openCV and then start loading your image or some other image which you want to recognize and you can take it encodings using face_recog lib
Create an Array for known Encodings
well as the above heading states create an array (sometimes it is a simple as that) and initialize few variables
Read , Resize and Process
Well now while True read the frame , resize it (do it so that it can work on real-time) and process it so that we can compare the face-encodings I have used the minimum distance formula so that we can compare faces easily and there are better methods than this . Experiment them yourself
Well that’s the end(at least for now)
P.S : I Know there is lot more to improve with my explanation and mostly code to , I will try to update them as quickly as possible and give your suggestions to my email(possible improvements or topics I should write an article about) and If you want to talk about this or any ML or computer vision topics do message me on my Linkedin here
Have a wonderful day