0% found this document useful (0 votes)
12 views6 pages

CNN for Custom Emoji Creation

Voice assistant using python

Uploaded by

Vivek Rawat
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views6 pages

CNN for Custom Emoji Creation

Voice assistant using python

Uploaded by

Vivek Rawat
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Graphic Era hill university

Emojify – Create your own emoji with Deep Learning


Submitted By:-Vivek Rawat Submitted to
B. tech Cse Mrs SonaliGupta
Section :-P
Student Id:-21011546

Abstract:-Emojis are small images that are commonly included in social media text messages. The combination of visual and
textual content in the same message builds up a modern way of communication. Emojis or avatars are ways to indicate
nonverbal cues. These cues have become an essential part of online chatting, product review, brand emotion, and many
more. It also led to increasing data science research dedicated to emoji-driven storytelling. With advancements in
computer vision and deep learning, it is now possible to detect human emotions from images. In this deep learning project,
we will classify human facial expressions to filter and map corresponding emojis or avatars. This project is not intended to
solve a real-world problem, instead it allows us to see things more colourful in the chatting world. Emoji-Fy is a software
which deals with the creation of Emoji’s or Avatars.

InToday’[Link],wethoughtofmakingourowncustomizedemojis.

Key-words:- Convolutional Neural Network(CNN), Deep Learning, Fer2013 Dataset.

Introduction:-

People use emojis every day? Emojis have become a new language that can more effectively express an idea or emotion.
This visual language is now a standard for online communication, available not only in Twitter, but also in another large
online platform such as Facebook and Instagram. In Today’s Generation people usually tend to communicate with each
other using Emoticons. So, we thought of making our own customized emojis. Emoji-Fy is a software which deals with the
creation of Emoji’s or Avatars.

The neural network has been an emerging application in numerous and diverse areas as example of end to end learning
This paper is based on a system which implements Convolutional Neural Network and Fer2013 Dataset to detect emotions
from facial expressions and converting them to personalised emojis.

We are building a convolution neural network to recognize facial emotions. We will be training our model on the FER2013
dataset. Then we’ll map those emotions with the corresponding emojis or avatars. Fer2013 contains approximately 30,000
facial RGB images of different expressions with size restricted to 48×48, and the main labels of it can be divided into 7
types: 0=Angry, 1=Disgust, 2=Fear, 3=Happy, 4=Sad, 5=Surprise, 6=Neutral. The Disgust expression has the minimal
number of images – 600, while other labels have nearly 5,000 samples each.

Methodology:-

Proposed System

A. Facial Emotion Recognition Using CNN

1. Build a CNN architecture.

Here we are importing all the required libraries needed for our model and then we are initialising the training and
validation generators i.e., we are first rescaling all our images needed to train our model and then converting them to
grayscale images.

• Imports:
• Initializing the training and validation generators

• Build the CNN architecture

2. Train the model on Fer2013 dataset.

Here we are training our network on all the images we have i.e., FER2013 dataset and then saving the weights in
model for the future predictions. Then using OpenCV harassed xml to detect the bounding boxes of face in webcam and
predict the emotions.

• Training the model


• Predicting emotions

B. Developing GUI and Mapping with emojis

Create a folder named emojis and save the emojis corresponding to each of the seven emotions in the dataset. The
trained model is tested on a set of images. Random images are introduced to the network and the output label is compared
to the original known label of the image. Parameters used for evaluation are F1 score, precision and recall. Precision is the
proportion of predicted positives that are truly positives.

 Testing

Fig 6: Loss Plot


Fig 7: Accuracy Plot

• Final Output

Here are some images of how will this project look. This dataset consists of facial emotions of
following categories: 0:angry 1:disgust 2:feat 3:happy 4:sad 5:surprise 6:natural.
Block Diagram

Tools Used:

● Google Collab supports both GPU and TPU instances, which makes it a perfect tool to train the model on large datasets

● We have also used various data science related libraries like koras, TensorFlow, OpenCV, matplotlib, NumPy etc. For the purpose of building
the keras model we have used sequential modelling technique.
● VS Code is used for overall development as a standard platform.
Conclusion:-
As Today’s generation people is loving the trend of communicating with non-verbalcues like emoticons so we
thought why not bring out our own emojis.
With advancements in computer vision and deep learning, we will now able to detect human emotions from
images. In this deep learning project, we will classify human facial expressions to filter and map corresponding
emojis or avatars.
The result we are expected is the use of emojify in chatting world. We want people to communicate with their
own customisable emoticon. The project will recognizeone’scurrent emotion and convert that emotion's emoji
so that the customer gets emoji of their face and use it in chatting.

Common questions

Powered by AI

The challenges associated with the training and deployment of the CNN model in the Emoji-Fy project include handling the imbalance in the FER2013 dataset, particularly the lower number of images for the 'Disgust' category compared to other emotions. Ensuring the model generalizes well across unseen data is another challenge, requiring careful validation and testing, potentially using techniques such as F1 score, precision, and recall to evaluate model performance. Additionally, integrating the model with real-time face detection and emotion recognition using OpenCV poses computational efficiency challenges, particularly when processing video input in real-time .

Data imbalances in the FER2013 dataset, particularly the underrepresentation of the 'Disgust' category with only 600 images compared to nearly 5,000 for other emotions, can lead to biased model training where the classifier might not learn to accurately recognize the less frequent class. This could result in lower precision and recall rates for that category, and potentially skew overall model performance, favoring more prevalent emotions and failing to adequately represent the full spectrum of human emotions in practical use cases .

The Emoji-Fy project enhances modern communication by providing a personalized method of expression through emojis that are generated based on the user's current emotions. As emojis are integral to non-verbal communication in digital platforms such as social media and messaging apps, this project adds a layer of customization that aligns closely with the user's actual emotional state. The use of computer vision and deep learning to accurately map facial expressions to emojis creates a new, vivid language that augments textual communication with relevant visual cues, thereby enriching the communicative experience .

Mapping facial expressions to emojis in digital communication offers enhanced expressiveness and personal connection by visualizing emotions in a universally recognized symbolic format. This allows users to convey complex emotional contexts quickly, succinctly, and across language barriers. For applications like chatting and social media interactions, it enriches the dialogue, making it more engaging and emotive. By precisely reflecting a person's current emotional state, such customization deepens relatability and understanding, effectively expanding the communication toolkit available in text-based platforms .

The use of Google Colab benefits the Emoji-Fy project by providing accessible and scalable computational resources, including GPU and TPU instances, which are crucial for efficiently training large-scale models like CNNs on big datasets such as FER2013. Google Colab's environment supports the integration of popular data science libraries such as TensorFlow and OpenCV, allowing developers to build, train, and refine their models in a streamlined manner, thus accelerating the deep learning workflow within the project .

The Emoji-Fy project addresses the classification of facial emotions through a trained CNN model on the FER2013 dataset, designed to discern between seven distinct emotions. To evaluate the effectiveness of this model, it employs metrics such as F1 score, precision, and recall. Precision assesses how many of the predicted positive instances are true positives, while recall measures how many actual positive instances are correctly identified by the model. The F1 score, a balance between precision and recall, provides a comprehensive understanding of the model's accuracy and reliability in categorizing emotional expressions .

The integration of OpenCV enhances the functionality of the Emoji-Fy project by enabling real-time face detection, which is crucial for prompt and accurate emotion recognition. OpenCV facilitates the identification of bounding boxes around facial regions in video streams, interacting directly with the trained CNN model to analyze expressions. This capability allows the application to dynamically update the emoticons corresponding to the user's current emotions, providing a seamless and interactive user experience that leverages live inputs from webcam feeds .

The significance of sequential modeling techniques in the Emoji-Fy project lies in their ability to systematically construct layered architectures of a CNN, which builds complexity and abstraction incrementally. This approach is well-suited for learning hierarchical features in image data, from basic edges and corners to more intricate patterns associated with emotional expressions. By organizing layers in a sequence, developers can fine-tune the model architecture for optimal performance in terms of accuracy and efficiency, making sequential modeling a pragmatic choice for the project's deep learning objectives .

The primary purpose of using a Convolutional Neural Network (CNN) in the Emoji-Fy project is to recognize human facial emotions from images and to map these emotions to corresponding emojis or avatars. The CNN is trained on the FER2013 dataset to perform facial emotion recognition, and its outputs are used to create a personalized emoji that reflects the user's current emotion. This approach leverages the effectiveness of CNNs in image processing to enhance online communication with non-verbal cues .

The Emoji-Fy project demonstrates advancements in computer vision by employing a CNN to automatically classify facial expressions and dynamically map them to corresponding emojis. This reflects the progress in using deep learning for detailed image analysis tasks that go beyond simple object detection to nuanced emotional recognition. Additionally, the integration with OpenCV for real-time face detection illustrates how computer vision techniques can be applied interactively on streaming data, enabling applications that react to changes in facial expressions instantly .

You might also like