Facial Emotion Recognition using CNN in PyTorch

Deyuan Qu,Sudip Dhakal,Dominic Carrillo
2023-12-18
Abstract:In this project, we have implemented a model to recognize real-time facial emotions given the camera images. Current approaches would read all data and input it into their model, which has high space complexity. Our model is based on the Convolutional Neural Network utilizing the PyTorch library. We believe our implementation will significantly improve the space complexity and provide a useful contribution to facial emotion recognition. Our motivation is to understanding clearly about deep learning, particularly in CNNs, and analysis real-life scenarios. Therefore, we tunned the hyper parameter of model such as learning rate, batch size, and number of epochs to meet our needs. In addition, we also used techniques to optimize the networks, such as activation function, dropout and max pooling. Finally, we analyzed the result from two optimizer to observe the relationship between number of epochs and accuracy.
Computer Vision and Pattern Recognition
What problem does this paper attempt to address?
The main goal of this paper is to implement a facial expression recognition system based on Convolutional Neural Networks (CNN) and to recognize human emotional expressions through real-time camera images. Specifically, the researchers aim to address the following issues: 1. **Improving Spatial Complexity**: Current methods typically read all data and input it into the model, leading to high spatial complexity. Therefore, the researchers aim to reduce spatial complexity by optimizing the model structure. 2. **Increasing Accuracy**: The researchers used the CNN model from the PyTorch library and adjusted hyperparameters (such as learning rate, batch size, number of iterations, etc.) to improve recognition accuracy while maintaining efficiency. 3. **Optimizing Network Structure**: To further enhance performance, the researchers employed techniques such as activation functions, Dropout, and max pooling to optimize the network structure. 4. **Evaluating the Effectiveness of Different Optimizers**: The researchers compared the performance of Stochastic Gradient Descent (SGD) and Adam optimizers under different training epochs. Through these methods, the researchers hope to contribute to the field of facial expression recognition and validate the effectiveness of their model through experiments. Ultimately, they achieved a validation accuracy of 60.20% on the FER2013 dataset, indicating that the model has a certain practical value.