This repository contains Python code for building and training a Convolutional Neural Network (CNN) for emotion detection. The model is trained on a dataset consisting of facial images representing different emotions.
The dataset is structured with separate folders for each emotion category. Each folder contains images corresponding to that emotion.
- angry/
- disgusted/
- fearful/
- happy/
- neutral/
- sad/
- surprised/
The CNN model consists of multiple convolutional layers, batch normalization, activation functions, and fully connected layers. It is compiled using the Adam optimizer and categorical crossentropy loss.
The model is trained using data augmentation on the training set and evaluated on a separate testing set. Training history, including loss and accuracy over epochs, is visualized using matplotlib.
https://github.com/swapnilpawar24/Emotion-detection-.git
The dataset contain 35,685 examples of 48x48 pixel gray scale images of faces divided into train and test dataset. Images are categorized based on the emotion shown in the facial expressions (happiness, neutral, sadness, anger, surprise, disgust, fear).
Dataset link
Swapnil Pawar