This project is aimed at building a comprehensive face recognition system with emotion detection capabilities. The project encompasses multiple phases, including machine learning, deep neural networks, and web application development using Django.
In this project, we have implemented the following phases:
In this phase, we perform face identification using machine learning techniques. Here's an overview of the steps involved:
-
Data Preprocessing: We preprocess the images, ensuring they are suitable for training.
-
Feature Extraction: Deep neural networks are used to extract features from facial images.
-
Modelling: We train various machine learning models, such as logistic regression, support vector machines, and random forest, using the features extracted from celebrity images.
-
Ensemble Learning: A voting classifier is employed to combine the predictions of individual models.
-
Hyperparameter Tuning: We fine-tune the hyperparameters to optimize the final model.
In this phase, we focus on emotion recognition using convolutional neural networks (CNNs). The process is as follows:
-
Data Preprocessing: We preprocess the images, ensuring they are suitable for training.
-
Modelling: We train a convolutional neural network to recognize emotions from facial expressions.
In the final phase, we create a web application using Django. The development process includes the following steps:
-
Web Frontend: We render the frontend using HTML, CSS, and Bootstrap for an appealing user interface.
-
Backend: The backend is powered by Python and the Django framework, following the MVT (Models, Views, Templates) architecture.
-
Database: We design and utilize an SQLite database for data storage.
-
Integration: Both the face recognition and emotion detection models are integrated into the web app to provide face analysis.
To run this project locally, follow these steps:
-
Clone the repository to your local machine.
-
Navigate to the project directory.
-
Install the necessary dependencies using the following command:
pip install -r requirements.txt
-
Get SECRET_KEY:
from django.core.management.utils import get_random_secret_key print(get_random_secret_key())
-
Run the Django development server:
python manage.py runserver
-
Access the web application by opening a web browser and entering the following URL:
http://localhost:8000/
Contributions to this project are welcome! If you have any improvements or suggestions, please open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
We would like to thank the open-source community for their valuable contributions and the dataset providers for making their data available for research and development.