Facial Analysis and Classification with OpenCV

This project focuses on face analysis and classification using the OpenCV and dlib libraries.

Part 1: Face Detection with OpenCV
A simple project that uses an OpenCV classifier (available at OpenCV Haarcascades) to detect faces in images.

Part 2: Face Recognition with OpenCV
This part involves the identification of 50 individuals with 15 images of each person's face. These images undergo preprocessing to standardize their sizes and convert them to a single color channel (grayscale). The preprocessed images are then used in Eigenface, Fisherfaces, and LBPH classification models available in the OpenCV library to identify individuals, achieving an accuracy of approximately:
Eigenface: 72% | Fisherfaces: 52% | LBPH: 79%

Part 3: Facial Landmark Detection with dlib
Using the dlib library to detect 68 facial landmarks, which outline the contours of the face, mouth, nose, eyes, and eyebrows. With these landmarks, relationships such as the opening of the eyes or mouth can be tracked in real-time videos, useful for facial expression recognition and image filter applications.

Exercises
The project includes the resolution of three extra exercises:
- Capturing images of the user's face, training a model to recognize it, and using a computer-connected camera (webcam) for real-time facial recognition.
- Using the webcam to identify the user's facial landmarks in real-time.
- Tracking the user's mouth opening to count the number of yawns performed while the code is running.

The project focuses on the following:
- Be capable of extracting regions of interest from an image.
- Normalize and preprocess image datasets.
- Build classifiers for face recognition.
- Validate the accuracy of the constructed model for real-world applications.
- Extract facial regions based on landmarks.
- Create applications that analyze different conditions of each facial component.

Developed: oct, 2023

Published: jul 15, 2024