Giter Club home page Giter Club logo

gan-rmfc-div-a-facialexpression's Introduction

GAN_FacialExpression

Generating different facial expressions.
This project utilizes Generative Adversarial Networks (GANs) to generate lifelike facial images based on various expressions. This project employs two different types of GAN architectures: Conditional GANs (cGANs) and Auxiliary Classifier GANs (ACGANs), to create diverse and expressive faces.

Introduction

Facial expression generation has long been a challenging task in the field of computer vision and artificial intelligence. We aim to overcome this challenge by leveraging the power of GANs, a class of machine learning algorithms that excel at generating realistic data samples.

Objective

The objective of this project is to utilize Generative Adversarial Networks (GANs), to generate synthetic facial images corresponding to different emotional expressions (e.g., happy, neutral, sad, angry, fear, surprised, disgust).
1.Utilize Conditional Generative Adversarial Networks (CGANs) and Auxiliary Classifier Generative Adversarial Networks (ACGANs) to generate realistic black and white facial images.
2.Incorporate specific emotion labels (happy, neutral, sad, angry, fear, surprised, disgust) to guide the generation process, enabling the creation of diverse facial expressions.
3.Train the GAN models on the fer2013 dataset to develop a system capable of synthesizing expressive facial images corresponding to different emotions, advancing research in emotion recognition and synthesis.

Flowchart

Screenshot 2024-05-02 at 8 40 51 PM

Architecture

We have used two primary architectures for expression-based facial image generation:
Conditional GAN (cGAN): In this architecture, the generator takes both a random noise vector and a conditional label representing the desired expression as input. The discriminator evaluates the generated images based on both their realism and whether they match the specified expression label.

Screenshot 2024-05-03 at 2 35 21 PM

Auxiliary Classifier GAN (ACGAN): ACGAN extends the cGAN architecture by introducing an auxiliary classifier in the discriminator. This classifier not only distinguishes between real and fake images but also predicts the expression label associated with the generated images.

Screenshot 2024-05-03 at 2 34 15 PM

Datasource:

Dataset contain a CSV file of black and white labeled 48x48 images from the FER2013 dataset. Data contains 35,887 records from Fer2013:
14,685 - Happy (29.63%) Emotion: 3
13,066 - Neutral (26.36%) Emotion: 6
6,345 - Sad (12.8%) Emotion: 4
5,205 - Angry (10.5%) Emotion: 0
5,142 - Fear (10.37%) Emotion: 2
4,379 - Surprised (8.82%) Emotion: 5
755 - Disgust (1.52%) Emotion: 1
The CSV contains 3 columns Emotion, Pixels and Usage.
(https://www.kaggle.com/datasets/nicolejyt/facialexpressionrecognition)

Conclusion

The project successfully leverages Conditional Generative Adversarial Networks (CGANs) and Auxiliary Classifier Generative Adversarial Networks (ACGANs) to generate realistic black and white facial images corresponding to specific emotion labels. By training these models on the fer2013 dataset, the system achieves the objective of synthesizing diverse and expressive facial expressions. Through rigorous evaluation, analysis, and optimization, the project demonstrates the effectiveness of GANs in generating high-quality facial images with fine-grained control over emotions.

Refrences

https://www.kaggle.com/datasets/nicolejyt/facialexpressionrecognition
https://machinelearningmastery.com/how-to-develop-a-conditional-generative-adversarial-network-from-scratch/
https://machinelearningmastery.com/how-to-develop-an-auxiliary-classifier-gan-ac-gan-from-scratch-with-keras/
https://www.geeksforgeeks.org/conditional-generative-adversarial-network/

gan-rmfc-div-a-facialexpression's People

Contributors

prishagorakh avatar

Stargazers

 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.