Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fyt3rp4til/facial-expression-recognition-pytorch


https://github.com/fyt3rp4til/facial-expression-recognition-pytorch

huggingface opencv pytorch timm

Last synced: 3 days ago
JSON representation

Awesome Lists containing this project

README

        

# Facial-Expression-Recognition-PyTorch

![Screenshot 2024-01-12 111917](https://github.com/Sudhanshu21xx/Facial-Expression-Recognition-PyTorch/assets/113416452/de93987a-5dec-4b66-9f2a-405e4ef577e5)

## Overview

Within this repository, an adept implementation of Facial Expression Recognition using PyTorch is provided. The model is skillfully trained to categorize facial expressions into various emotions, encompassing happiness, sadness, anger, surprise, fear, disgust, and neutrality. Leveraging the power of deep learning, the project capitalizes on PyTorch, a dynamic and versatile deep learning framework, surpassing the capabilities of TensorFlow. PyTorch's dynamic computational graph and intuitive design make it an excellent choice for this task, offering flexibility and ease of use during model development and training. The project's focus on emotion classification caters to a broad spectrum of applications, from human-computer interaction to sentiment analysis in various fields. By combining the rich feature set of PyTorch with the nuanced task of recognizing facial expressions, this implementation stands as a testament to the efficiency and effectiveness of PyTorch in the realm of deep learning-based facial expression recognition systems.

## Features

The repository is equipped with a powerful pre-trained model, namely "efficientnet_b0," tailored specifically for facial expression recognition tasks. This model has demonstrated exceptional performance, boasting an impressive accuracy rate of 93%, surpassing the majority of existing models accessible on the internet. The use of the efficientnet_b0 architecture signifies a commitment to efficiency and effectiveness in handling complex visual recognition tasks, making it a standout choice for facial expression recognition. Leveraging state-of-the-art techniques, this model not only achieves high accuracy but also offers a user-friendly interface, facilitating easy integration into various applications and projects. With its robust capabilities, the efficientnet_b0 model becomes a valuable asset for researchers, developers, and practitioners seeking top-tier solutions in the realm of facial expression recognition. With higher computational capabalities "efficientnet_b7" could be used which will provide even higher accuracy.

## Comparision of Efficientnet Models
![](https://github.com/Sudhanshu21xx/Facial-Expression-Recognition-PyTorch/assets/113416452/71726e59-55f8-415a-b83e-61cafac3a3eb)

### Resources on Efficientnet [[1]](https://keras.io/api/applications/efficientnet/) [[2]](https://paperswithcode.com/method/efficientnet#:~:text=Introduced%20by%20Tan%20et%20al,resolution%20using%20a%20compound%20coefficient.) [[3]](https://medium.com/mlearning-ai/understanding-efficientnet-the-most-powerful-cnn-architecture-eaeb40386fad)

![1](https://github.com/Sudhanshu21xx/Facial-Expression-Recognition-PyTorch/assets/113416452/581327ef-6595-4da8-99d9-426e33318c0c)

## :warning: Requirements

- [Python 3.x](https://www.python.org/downloads/)
- [PyTorch](https://pytorch.org/)
- [NumPy](https://numpy.org/)
- [OpenCV](https://opencv.org/)
- [Matplotlib](https://matplotlib.org/)
- [Albumentations](https://github.com/albumentations-team/albumentations)
- [timm](https://github.com/huggingface/pytorch-image-models)

## :bulb: Workflow

![3](https://github.com/Sudhanshu21xx/Facial-Expression-Recognition-PyTorch/assets/113416452/3c9c03db-67b5-43cd-a501-28088f4ee62b)

## :key: Results
![Screenshot 2024-01-12 105356](https://github.com/Sudhanshu21xx/Facial-Expression-Recognition-PyTorch/assets/113416452/5e3dfd13-6a60-4d68-b8ad-bdd676b185f4)

![Screenshot 2024-01-12 105502](https://github.com/Sudhanshu21xx/Facial-Expression-Recognition-PyTorch/assets/113416452/953b6ec0-5333-4785-b25d-e08483d91479)

![Screenshot 2024-01-12 105555](https://github.com/Sudhanshu21xx/Facial-Expression-Recognition-PyTorch/assets/113416452/d872199f-96a2-429e-b117-6a995c92cd00)

![Screenshot 2024-01-12 105613](https://github.com/Sudhanshu21xx/Facial-Expression-Recognition-PyTorch/assets/113416452/f13a46ce-8552-43c5-97aa-9c84430a99fa)

![Screenshot 2024-01-12 105631](https://github.com/Sudhanshu21xx/Facial-Expression-Recognition-PyTorch/assets/113416452/f273c307-14aa-4234-83e4-ad19b3658381)

![Screenshot 2024-01-12 105807](https://github.com/Sudhanshu21xx/Facial-Expression-Recognition-PyTorch/assets/113416452/d9e940df-8ebb-4a98-a003-0086aa0f608e)

![Screenshot 2024-01-12 110114](https://github.com/Sudhanshu21xx/Facial-Expression-Recognition-PyTorch/assets/113416452/846a116f-34ba-487e-b4f4-d5bb91555150)