Skip to content

Jadhavsakshi7887/Emotion-Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Emotion Detection using CNN Overview This project is an Emotion Detection model built using Convolutional Neural Networks (CNNs). The model classifies emotions in images of faces into different categories such as happy, sad, angry, etc. It is designed to be used for various applications including sentiment analysis, human-computer interaction, and more.

Features Emotion Classification: Detects and classifies emotions from facial images. Pre-trained Model: Model trained on a dataset of facial expressions. High Accuracy: Achieves high accuracy in classifying different emotions. Installation To use this project, you need to have Python 3.11 and the necessary libraries installed. You can set up the environment using the following steps:

Clone the Repository:

git clone https://github.com/Jadhavsakshi7887/emotion-detection-cnn.git cd emotion-detection-cnn Create a Virtual Environment (Optional but recommended):

python -m venv env source env/bin/activate
Install Dependencies:

pip install -r requirements.txt Usage Load the Model:

from keras.models import load_model

model = load_model('emotion_detection_model.h5') Prepare the Input Image:

from keras.preprocessing import image from keras.applications.vgg16 import preprocess_input import numpy as np

#prepare input images def prepare_image(img_path): img = image.load_img(img_path, target_size=(48, 48), grayscale=True) img_array = image.img_to_array(img) img_array = np.expand_dims(img_array, axis=0) img_array = preprocess_input(img_array) return img_array

Model Details Architecture: Convolutional Neural Network (CNN) Dataset: Trained on Emotion Dataset (you can include a description if it’s different) Training Accuracy: 70% (Adjust based on your actual model performance) Files emotion_detection_model.h5: The trained model file. requirements.txt: List of required Python libraries. model.py: Script containing model architecture and training code. predict.py: Script to make predictions on new images. Contributing Feel free to contribute to this project by submitting issues or pull requests. For major changes, please open an issue first to discuss what you would like to change.

License This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgements The dataset used for training the model is available on Kaggle. The CNN architecture is inspired by VGG16. Contact For any questions or feedback, please reach out to [email protected]

Feel free to adjust any sections to better fit your project specifics or preferences.

About

Emotion Detection using CNNs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published