{"id":17736410,"url":"https://github.com/samanyougarg/group-emotion-recognition","last_synced_at":"2025-06-27T23:03:57.324Z","repository":{"id":37597508,"uuid":"156727331","full_name":"samanyougarg/Group-Emotion-Recognition","owner":"samanyougarg","description":"Group Emotion Recognition using deep neural networks and Bayesian classifiers.","archived":false,"fork":false,"pushed_at":"2022-12-08T01:41:46.000Z","size":180475,"stargazers_count":46,"open_issues_count":22,"forks_count":24,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-01T09:38:43.253Z","etag":null,"topics":["bayesian-network","cnn","computer-vision","convolutional-neural-networks","deep-learning","emotion","emotion-analysis","emotion-detection","emotion-recognition","facial-expression-recognition","flask","group-emotion-recognition","image-processing","keras","numpy","pandas"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samanyougarg.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}},"created_at":"2018-11-08T15:26:02.000Z","updated_at":"2025-03-31T02:36:25.000Z","dependencies_parsed_at":"2023-01-25T02:15:07.772Z","dependency_job_id":null,"html_url":"https://github.com/samanyougarg/Group-Emotion-Recognition","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/samanyougarg/Group-Emotion-Recognition","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samanyougarg%2FGroup-Emotion-Recognition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samanyougarg%2FGroup-Emotion-Recognition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samanyougarg%2FGroup-Emotion-Recognition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samanyougarg%2FGroup-Emotion-Recognition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samanyougarg","download_url":"https://codeload.github.com/samanyougarg/Group-Emotion-Recognition/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samanyougarg%2FGroup-Emotion-Recognition/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262347472,"owners_count":23296893,"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":["bayesian-network","cnn","computer-vision","convolutional-neural-networks","deep-learning","emotion","emotion-analysis","emotion-detection","emotion-recognition","facial-expression-recognition","flask","group-emotion-recognition","image-processing","keras","numpy","pandas"],"created_at":"2024-10-26T00:22:47.692Z","updated_at":"2025-06-27T23:03:57.307Z","avatar_url":"https://github.com/samanyougarg.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Group-Emotion-Recognition\n\n![Python](https://camo.githubusercontent.com/c589348df8bb82948f724198f52725d3d36ce738/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f707974686f6e2d332e782d627269676874677265656e2e737667)\n\nThis project aims to classify a group’s perceived emotion as Positive, Neutral or Negative. The dataset being used is the [Group Affect Database 3.0](https://sites.google.com/view/emotiw2018) which contains \"in the wild\" photos of groups of people in various social environments.\n\nOur solution is a hybrid machine learning system that builds on the model by [Surace et al.](https://arxiv.org/abs/1709.03820) and extends it further with additional and more refined machine learning methods and experiments. It has been published in the paper [Group Emotion Recognition Using Machine Learning](https://arxiv.org/pdf/1905.01118.pdf).\n\n\n## Demo\n\n### 1. Video\n[![Youtube Video](http://i.imgur.com/GPgEKL0.png)](https://www.youtube.com/watch?v=-q2u0Xd2oCA \"Youtube Video\")\n\n### 2. Apps (Not working)\n\n[\u003cimg src=\"https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png\"\n      alt=\"Download from Google Play\"\n      height=\"81\"\u003e](https://play.google.com/store/apps/details?id=com.hanuman.groupemotionrecognition)\n[\u003cimg src=\"https://i.imgur.com/6B3Qw5s.png\"\n      alt=\"Web App\"\n      height=\"80\"\u003e](https://ger.hackeryogi.com/)\n\n## Instructions\n\nThis repository consists of 3 branches - \n1. `master` - contains the code used to train and test the model.\n2. `webapp` - contains the webapp.\n3. `android` - contains the android app.\n\n### 1. master branch\n\n#### 1.1 To classify an image (or a set of images) using the full pipeline\n\n1. Fork this repository and clone the forked repository.\n2. Create and activate a Python 3 virtualenv.\n3. Use `pip install -r requirements.txt` to install the requirements.\n4. Download the final ensemble CNN model from [here](https://drive.google.com/open?id=1dkk7K_R16fW7T0ETsaaG5lT0PZG8K7uE) and model architecture from [here](https://drive.google.com/open?id=1vAR-_QIPpAVYBWNlg6E_CJ1FGnePkW2i) and paste/replace in the cloned repository.\n5. Use `python classify_image.py image_dir original_label` to classify an image as Positive, Neutral or Negative. eg - `python classify_image.py input/val/Positive/ Positive` classifies the images in the `input/val/Positive/` directory with original label as `Positive`.\n\n\n### 2. webapp branch\n\n#### 2.1 To run the web app locally\n\n1. Fork this repository and clone the forked repository. (Ignore if already done in 1.1.)\n2. Use `git checkout webapp` to switch to the webapp branch.\n2. Create and activate a Python 3 virtualenv. (Ignore if already done in 1.1.)\n3. Use `pip install -r requirements.txt` to install the requirements.\n4. `python manage.py runserver` to start the server. Frontend can be accessed at `http://127.0.0.1:5000`\n\n---\n\n## The Need for Emotion Recognition\n\nSo, first of all, why do we need emotion recognition?\n\nEmotion recognition is important -\n\n*   To improve the user’s experience, as a customer, learner, or as a generic service user.\n*   Can help improve services without the need to formally and continuously ask the user for feedback.\n*   Also, using automatic emotion recognition in public safety, healthcare, or assistive technology, can significantly improve the quality of people’s lives, allowing them to live in a safer environment or reducing the impact that disabilities or other health conditions have.\n\n## Applications of Emotion Recognition\n\nEmotion Recognition has applications in crowd analytics, social media, marketing, event detection and summarization, public safety, human-computer interaction, digital security surveillance, street analytics, image retrieval, etc.\n\n## The rise of Group Emotion Recognition\n\nThe problem of emotion recognition for a group of people has been less extensively studied, but it is gaining popularity due to the massive amount of data available on social networking sites containing images of groups of people participating in social events.\n\n## Challenges facing Group Emotion Recognition\n\nGroup emotion recognition is a challenging problem due to obstructions like head and body pose variations, occlusions, variable lighting conditions, variance of actors, varied indoor and outdoor settings and image quality.\n\n## Approach\n\nOur solution is a pipeline based approach which integrates two modules (that work in parallel): bottom-up and top-down modules, based on the idea that the emotion of a group of people can be deduced using both bottom-up and top-down approaches.\n\n- The bottom-up module detects and extracts individual faces present in the\nimage and passes them as input to an ensemble of pre-trained Deep\nConvolutional Neural Networks (CNNs).\n- Simultaneously, the top-down module detects the labels associated with the\nscene and passes them as input to a Bayesian Network (BN) which predicts\nthe probabilities of each class.\n- In the final pipeline, the group emotion category predicted by the bottom-up\nmodule is passed as input to the Bayesian Network in the top-down module\nand an overall prediction for the image is obtained.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamanyougarg%2Fgroup-emotion-recognition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamanyougarg%2Fgroup-emotion-recognition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamanyougarg%2Fgroup-emotion-recognition/lists"}