This repository contains the implementation of an emotion recognition model using the VGG16 architecture.The project involves fine-tuning a pre-trained VGG16 model for emotion classification using the FER2013 dataset combined with additional custom facial emotion datasets, and the necessary code is provided.
Vggmain.ipynb: The main notebook for setting up the VGG16 model, training, and evaluating it on the dataset.try 2 vgg16 fine tune.ipynb: A notebook showcasing fine-tuning techniques applied to the VGG16 model to improve performance.
- Fine-tuning of the VGG16 model using the FER2013 dataset along with custom emotion image datasets.
- Includes trained model weights to save training time.
- Reproducible code for training and evaluation.
To run the notebooks and use the model, you need the following:
- Python 3.7 or later
- TensorFlow (>=2.0)
- Keras
- Jupyter Notebook
- NumPy
- Pandas
- Matplotlib
Install the dependencies using:
pip install tensorflow keras numpy pandas matplotlib-
Clone the repository:
git clone https://github.com/your-username/emotion-recognition-vgg16.git cd emotion-recognition-vgg16 -
Open the notebooks in Jupyter:
jupyter notebook Vggmain.ipynb
-
To fine-tune the model, open and run the
try 2 vgg16 fine tune.ipynbnotebook.
- Architecture: VGG16 (Pre-trained on ImageNet)
- Dataset: FER2013 dataset combined with additional custom facial emotion dataset (not included; you can replace it with your own dataset).
- Output: Emotion classes such as Happy, Sad, Angry, Neutral, etc.
The fine-tuned model achieved the following accuracy on the test dataset:
- Accuracy: 67%
- Loss: 0.87
You can load the model weights as follows:
from tensorflow.keras.models import load_model
## Contribution
Feel free to contribute to this repository by creating issues or submitting pull requests. Contributions can include:
- Improving the documentation
- Adding more datasets
- Enhancing the model architecture
- Fine-tuning techniques
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Author
[Sriyanka Baral]
LinkedIn: https://www.linkedin.com/in/sriyanka-baral-382795282/