{"id":14958988,"url":"https://github.com/msiddhu/emotion-detection","last_synced_at":"2025-04-02T08:31:10.726Z","repository":{"id":163894552,"uuid":"236924031","full_name":"msiddhu/Emotion-detection","owner":"msiddhu","description":"A emotion detection tool based on TensorFlow and OpenCV","archived":false,"fork":false,"pushed_at":"2021-04-30T10:05:06.000Z","size":22402,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T17:12:36.777Z","etag":null,"topics":["accuracy","dataset","emotion-detection","faces","numpy","opencv","python","tensorflow","tensorflow-models","webcam-feed"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/msiddhu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-01-29T07:09:47.000Z","updated_at":"2023-08-02T07:11:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"7a9331e7-e924-44ea-a72c-fa12e17a7d23","html_url":"https://github.com/msiddhu/Emotion-detection","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msiddhu%2FEmotion-detection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msiddhu%2FEmotion-detection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msiddhu%2FEmotion-detection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msiddhu%2FEmotion-detection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msiddhu","download_url":"https://codeload.github.com/msiddhu/Emotion-detection/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246782003,"owners_count":20832954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["accuracy","dataset","emotion-detection","faces","numpy","opencv","python","tensorflow","tensorflow-models","webcam-feed"],"created_at":"2024-09-24T13:18:38.835Z","updated_at":"2025-04-02T08:31:05.705Z","avatar_url":"https://github.com/msiddhu.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Emotion-detection\n\n## Introduction\n\nThis project aims to classify the emotion on a person's face into one of **seven categories**, using deep convolutional neural networks. This repository is an implementation of [this](https://github.com/msiddhu/Emotion-detection/blob/master/ResearchPaper.pdf) research paper. The model is trained on the **FER-2013** dataset which was published on International Conference on Machine Learning (ICML). Face images with **seven emotions** - angry, disgusted, fearful, happy, neutral, sad and surprised.\n\n## Dependencies\n\n* Python 3, [OpenCV 3 or 4](https://opencv.org/), [Tensorflow 1 or 2](https://www.tensorflow.org/)\n* To install the required packages, run `pip install -r requirements.txt`.\n\n## Usage\n\nThe repository is currently compatible with `tensorflow-2.0` and makes use of the Keras API using the `tensorflow.keras` library.\n\n* pretrained model link-\n\n* The folder structure is of the form:  \n  Tensorflow:\n  * data (folder)\n  * `emotions.py` (file)\n  * `haarcascade_frontalface_default.xml` (file)\n  * `model.h5` (file)\n\n* This implementation by default detects emotions on all faces in the webcam feed.\n\n* With a simple 4-layer CNN, the test accuracy peaked at around 50 epochs at an accuracy of 63.2%.\n\n![Accuracy plot](accuracy.png)\n\n## Algorithm\n\n* First, we use **haar cascade** to detect faces in each frame of the webcam feed.\n\n* The region of image containing the face is resized to **48x48** and is passed as input to the CNN.\n\n* The network outputs a list of **softmax scores** for the seven classes.\n\n* The emotion with maximum score is displayed on the screen.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsiddhu%2Femotion-detection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsiddhu%2Femotion-detection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsiddhu%2Femotion-detection/lists"}