Facial Expression Detection
Tags: ai, deeplearning, machinelearning
Published: 2023-12-25 08:26:35

_This Project is a part of curriculum of Project Exhibition II  during my B.Tech CSE at VIT Bhopal University_

_The objective of face Expression is, from the incoming image, to find a series of data of the same face in a set of training images in a database. The great difficulty is ensuring that this process is carried out in real-time, something that is not available to all biometric facial recognition software providers._

Face recognition is a pattern recognition technique and one of the most important biometrics; it is used in a broad spectrum of applications. The accuracy is not a major problem that specifies the performance of automatic face recognition system alone, the time factor is also considered a major factor in real time environments. Recent architecture of the computer system can be employed to solve the time problem, this architecture represented by multi-core CPUs and manycore GPUs that provide the possibility to perform various tasks by parallel processing. However, harnessing the current advancements in computer architecture is not without difficulties.
## Module - 1 live Face detection Design & Implementation

![Flowchart of facial detection](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9mobskjavdfxk4re441o.png)
To recognize a face, it is first important that we detect/locate a face in an image/video. There is various facial detection software that can detect a Human face in an image. We extract a human face and then move on to the next step. Viola-Jones algorithm is one of the popular face detection algorithms. 

The next step is to extract features from a face using a face embedding model. A face embedding is a vector that represents the features extracted from the face and we can use these vectors to recognize faces. Note that face embedding for the same face may be really close in the vector whereas the face embeddings of two different faces may be really far away. We get a face embedding after passing the image through a face embedding model.

We have face embedding for each face in the system. Whenever we pass a new face to the system, it calculates its face embedding and compares it with the ones we already have. The face is recognized, its face embedding closely matches any other face embedding in the database.

## Module-2 Facial Expression Design and Implementation
A deep learning Model based on CNN before, it is noted that the original images collected from online courses need to be pre-processed, including face detection, alignment, rotation, and resize, according to the different elements in the original images. the process of the FER, and the detailed steps of the proposed framework are as follows: first, the cameras built in the electronic devices are utilized to capture the facial images of the attending students. Second, the facial expression recognition algorithm trained by the standard facial expression database is employed to detect the faces and classify the facial expressions. the histogram of probability distribution about the expression is plotted and provided in the form of h5 model graph.

![Output](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4ehxas8gadylatxss7yi.png)

![Performance](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tnnny288tdeskfh9ljr5.png)

To get a better model we need to train with more epoch and with more images. For that we need high computational power, which cannot be done a personal computer.

[Research Gate Link](https://www.researchgate.net/publication/372743093_FACE_DETECTION_EMOJI_PICKER)

## Youtube Video:
{% embed https://www.youtube.com/embed/TX85z9PriaI %}

{% embed https://github.com/Abijspy/Facial-Regonication- %}