Giter Site home page Giter Site logo

faezesarlakifar / face-emotion-recognition Goto Github PK

View Code? Open in Web Editor NEW
9.0 1.0 0.0 6.8 MB

Recognition of Iranian human facial emotions across four categories: Happy, Sad, Angry, and Neutral.

Jupyter Notebook 100.00%
face-emotion-recognition image-processing self-supervised-learning mtcnn-face-detection jigsaw-puzzle

face-emotion-recognition's Introduction

Persian Facial Emotion Recognition using Deep Learning

Introduction

This project aims to explore deep learning techniques for facial emotion recognition. While nationality-specific differences are not a primary concern, the project aims to implement and test various deep learning methods, including self-supervised and transfer learning, to achieve good facial emotion classification and enhance understanding of deep learning through practical experience.

Project Overview

  • Data Collection: A large number of sample frames from videos were extracted, and the MTCNN model was used for human face detection, resulting in a dataset of human face images.

  • Transfer Learning for Face Detection: Using pre-trained model 'Inception-ResNetV2' for accurate face detection, ensuring high-quality face images for subsequent tasks.

  • Self-Supervised Learning: Utilizing pretext tasks like jigsaw puzzles and rotation, pre-trained the model on the collected images.

  • Customized Dataset: Standard photos of Persian human faces were gathered, with four emotion categories (happy, sad, neutral, and angry) for each individual. This dataset contains images from just 15 individuals.

  • Fine-tuning: The pre-trained model was fine-tuned on the customized dataset to improve its performance in Persian human face emotion recognition.

Project Workflow

  1. Face Detection: The MTCNN model was used for initial face detection. Subsequently, an Inception-ResNet model was fine-tuned for accurate face detection, ensuring high-quality face images.

  2. Data Refinement: Non-human faces were filtered out by comparing results from both MTCNN and the fine-tuned face detection model, ensuring a dataset of genuine human faces.

  3. Self-Supervised Learning: Self-supervised learning techniques, including two pretext tasks, jigsaw puzzles, and rotation, were implemented to pre-train the model on the refined dataset.

  4. Emotion Recognition: The pre-trained model of the last part was trained for facial emotion recognition using the customized dataset.

  5. Evaluation: The performance of the emotion recognition models was assessed, including metrics and insights.

Project Goals

The key goals of this project include:

  1. Comprehensive Deep Learning Exploration: Conduct a complete deep learning project from data collection to model development, gaining practical experience in data preparation, preprocessing the data, and advanced deep learning techniques.

  2. Transfer Learning for Face Detection: Implement transfer learning to fine-tune a model for accurate face detection. The results were combined with MTCNN, and if either model predicts an image as a non-human face, that image is removed from the facial dataset.

  3. Self-Supervised Learning: Utilize self-supervised learning techniques to pretrain models, gaining insights into their effectiveness in improving feature representations.

  4. Iranian Facial Emotion Recognition: Train and evaluate deep learning models for facial emotion recognition, providing insights into their performance on the refined data.

Customized Dataset

samples of the customized dataset:

angry neutral happy sad
sample angry sample neutral sample happy sample sad

Face Verification

Faces detected by MTCNN, which include a non-face image, were removed by the fine-tuned Inception-ResNet model, which predicted it as a non-facial image:

MTCNN-detected-faces

Permissions

For preparing the customized dataset, photos were taken in a hospital with the permission of the people to share, take, and use their facial photos for this project. All the individuals whose photos we have taken, have granted us permission to share and utilize them for this project.

face-emotion-recognition's People

Contributors

faezesarlakifar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.