This project is a facial emotion detection system that uses deep learning techniques to recognize and classify human emotions based on facial expressions. It is designed to provide a reliable and efficient solution for detecting emotions such as happiness, sadness, anger, and more in real-time or from images.
- Real-time emotion detection from live video streams.
- Emotion classification for individual images.
- Supports multiple emotions, including happiness, sadness, anger, and more.
To use this facial emotion detection system, follow these installation steps:
-
Clone the repository:
git clone https://github.com/tajammulbasheer/facial_emotion_detection.git
-
Navigate to the project directory:
cd facial_emotion_detection
-
Install the required Python packages using
pip
:pip install -r requirements.txt
You can use the facial emotion detection system as a standalone application or integrate it into your own projects. Here's how to run the system:
-
To perform real-time emotion detection, run the following command:
python predict_oncam.py --model_path 'path to saved model'
-
To classify the emotion in an individual image, use the following command:
python predict_onimage.py --model_path 'path to saved model' --image your_image.jpg
If you want to train your own emotion detection model, follow these steps:
-
Prepare your dataset of facial expressions with corresponding emotion labels.
-
Modify the model architecture in
train_build_model.py
to suit your requirements. -
Train your model using your dataset:
python train_build_model.py --data_path /path/to/your/dataset
-
After training, save the model weights and update the configuration in the code to use your custom model.