Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimized for real case uses, as Tkinter based projects #18

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

aweirdwhale
Copy link

The class FaceRecognition is designed for performing face recognition tasks using deep learning techniques. Here's a brief overview of how it works:

  • Initialization: Upon instantiation, it sets up paths for storing embeddings, recognizers, and label encoders. It also loads necessary pre-trained models for face detection and embedding extraction.

  • Dataset Preparation: It provides methods to create a directory for a user and implement a dataset for face recognition. The create_directory method creates a directory for a specific user, while implement_dataset captures images from a camera and saves them in the user's directory.

  • Feature Extraction: The extract method extracts facial embeddings from the dataset using a pre-trained deep learning model. It detects faces in images, extracts facial regions, and computes embeddings.

  • Model Training: The train method trains a support vector machine (SVM) classifier using the extracted facial embeddings. It serializes the trained model and label encoder for later use in recognition.

  • Face Recognition: The recognition method performs real-time face recognition using the trained SVM classifier. It captures frames from a camera, detects faces, extracts embeddings, and classifies them using the trained model. If the confidence score for a prediction is high enough, it returns the recognized name along with the confidence percentage.

Overall, this class encapsulates the entire pipeline for face recognition, including dataset preparation, feature extraction, model training, and real-time recognition.

Optimised to use in UI projects

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant