Face detection, recognition, and generation have a wide range of applications in various fields, including security, emotion detection, and attendance tracking. However, existing algorithms may not perform well with side-view images of faces. This project aims to address this issue by generating frontal face images from side-view images using Generative Adversarial Networks (GANs) and enhancing face recognition algorithms to work effectively with images from different angles and poses.
The project is divided into the following main components:
-
Front Face and Side Face Detection:
- Utilizing OpenCV and Haar cascade classifier for face detection.
- Detecting and processing side-view images to prepare for GAN training.
-
Side Face to Front Face Generation:
- Implementing a Generative Adversarial Network (GAN) to generate frontal face images.
- Training the GAN using side-view and corresponding front face images.
-
Face Recognition:
- Extracting face embeddings from images using deep learning.
- Training a Support Vector Machine (SVM) for face recognition.
- Applying face recognition to detect and recognize known faces.
- Clone the repository:
git clone https://github.com/your-username/side-face-to-front-face.git
- Prepare your dataset by organizing side-view and front face images into appropriate folders.
- Preprocess the dataset using the provided
cropFace()
function to extract face regions. - Train the GAN using the training script. Adjust hyperparameters as needed.
- Train the face recognition model using the provided face embeddings and SVM training script.
- Use the trained models to generate front face images from side-view images and perform face recognition.
Include examples of generated front face images and demonstrate the face recognition performance using images or videos.
- OpenCV
- TensorFlow (for GAN)
- Scikit-learn (for SVM)
- Other dependencies listed in requirements.txt
Contributions are welcome! If you find any issues or want to enhance the project, feel free to submit a pull request.