Data Scientist
ML Engineer
Data Analyst
Python
PyTorch
shape_predictor_68_face_landmarks.dat
dlib_face_recognition_resnet_model_v1.dat
haarcascade_frontalface_default.xml
(from OpenCV for face detection)captured_images/
with that name, where the images will be stored.training.py
script to train the face recognition model.captured_images/
folder, extracts facial features using Dlib’s model, and trains an SVM classifier.face_recognition_model.pkl
, and a label dictionary is generated for mapping person names to labels.q
key to quit the program.data_collection.py
create_directory(name)
: Creates a folder to store images.capture_images(name, num_images=1000)
: Captures face images and saves them in the created directory.training.py
load_images(directory)
: Loads images and their labels from the given directory.extract_features(images, labels)
: Extracts face descriptors from the images using Dlib.train_model(features, labels)
: Trains an SVM classifier on the extracted face descriptors.recognition.py
load_model()
: Loads the pre-trained model and label dictionary.estimate_distance(face)
: Roughly estimates the distance of the face from the camera.get_light_intensity(image)
: Calculates the light intensity of the image frame.draw_face_mesh(image, shape)
: Draws a face mesh with 68 landmarks on the detected face.Contribute to IM07813/RealTime-Face-ID_opencv development by creating an account on GitHub.
0
0
Data Scientist
ML Engineer
Data Analyst
Python
PyTorch