Captures images from your webcam video stream Extracts all Faces from the image,Recognise Faces
FaceRecognition/face recog/face_data_collect.py
Python Script that captures images from your webcam video stream Extracts all Faces from the image frame (using haarcascades) Stores the Face information into numpy arrays
-
Read and show video stream, capture images
-
Detect Faces and show bounding box (haarcascade)
-
Flatten the largest face image(gray scale) and save in a numpy array
-
Repeat the above for multiple people to generate training data
FaceRecognition/face recog/face_recognition.py
Recognise Faces using some classification algorithm - like Logistic, KNN, SVM etc.
-
load the training data (numpy arrays of all the persons) # x- values are stored in the numpy arrays # y-values we need to assign for each person
-
Read a video stream using opencv
-
extract faces out of it
-
use knn to find the prediction of face (int)
-
map the predicted id to name of the user
-
Display the predictions on the screen - bounding box and name
FaceRecognition/face recog/haarcascade_frontalface_alt.xml
trained haarcasecade for frontalface
download from