{"id":21684946,"url":"https://github.com/pd2871/emotion-detection","last_synced_at":"2026-04-13T05:37:07.327Z","repository":{"id":112099525,"uuid":"306271900","full_name":"pd2871/Emotion-Detection","owner":"pd2871","description":null,"archived":false,"fork":false,"pushed_at":"2022-02-17T22:13:02.000Z","size":65041,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-25T12:07:43.848Z","etag":null,"topics":["cnn","computer-vision","deep-learning","emotion-detection","emotion-recognition","face-detection","face-recognition","opencv","python"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/pd2871.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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}},"created_at":"2020-10-22T08:28:33.000Z","updated_at":"2022-04-11T20:23:12.000Z","dependencies_parsed_at":"2023-03-13T13:29:35.875Z","dependency_job_id":null,"html_url":"https://github.com/pd2871/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/pd2871%2FEmotion-Detection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pd2871%2FEmotion-Detection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pd2871%2FEmotion-Detection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pd2871%2FEmotion-Detection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pd2871","download_url":"https://codeload.github.com/pd2871/Emotion-Detection/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244603210,"owners_count":20479791,"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":["cnn","computer-vision","deep-learning","emotion-detection","emotion-recognition","face-detection","face-recognition","opencv","python"],"created_at":"2024-11-25T16:17:36.288Z","updated_at":"2025-12-31T00:06:04.492Z","avatar_url":"https://github.com/pd2871.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Emotion Detection using CNN\n### Aim \n- To detect the face from live camera frame and use CNN to classify the facial expression of person in the frame (Happy, Angry, Sad, Surprised, Calm, Neutral)\n\n\n### Description\n- This project is based on CNN and face recognition technique using HAAR CASCADE.\n- Accuracy of the model is around 55% since facial expressions seems to be similar(like calm and neutral are similiar, angry and sad seems similar)\n- Face Detection process is fast using HAAR CASCADE but however it can be improved using MTCNN\n- Retraining with different models will be taking a lot of time since the images are around 37000 with 150*150 pixels, so its beter to use the pretrained model(took me 4 hours     for 20 epochs). \n- Download the whole repo along with dataset from \u003ca href=\"https://drive.google.com/file/d/169B_2gzVGFWEJbdzbweR3kwM6iL_Y_1B/view?usp=sharing\"\u003ehere\u003c/a\u003e for manual training. \n- The images size can be decreased to 50*50 for faster training\n\n### Process\n- Used CNN to classify the input images into emotions like Happy, Sad, Angry,etc. with accuracy of around 55%. Saved the model \n- Used OpenCV to detect face and extract the face from live frames\n- Applied the saved model to the detected faces \n- Model predicted the emotions of the detected face\n- Used OpenCV to show the frame along with the prediciton made by model and the bounding box detected by the HAAR CASCADE\n\n\n### Frameworks\n- Tensorflow\n- Keras\n- Scikit-learn\n- OpenCV\n\n### Libraries\n- tqdm\n- Numpy\n- Matplotlib\n\n### Installation and Working Guide\n- Download the zip file of this repo or clone the repo\n- Install the required frameworks and libraries in a new environment\n- Download the h5 file from \u003ca href=\"https://drive.google.com/file/d/1tO0vKQ9m9hXd_5nkvqh5nAnvgqtlhqx4/view?usp=sharing\"\u003ehere\u003c/a\u003e and move it to the working directory\n- Open terminal and change the directory to the downloaded unzipped folder\n- Run the below command\n```\npython face.py\n```\nFacial Emotions will be classified in real-time\n\n ## Thank you!!! :clap: :clap: :clap: :heart:\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpd2871%2Femotion-detection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpd2871%2Femotion-detection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpd2871%2Femotion-detection/lists"}