Giter Club home page Giter Club logo

sanjaymarreddi / emotion-investigator Goto Github PK

View Code? Open in Web Editor NEW
47.0 2.0 71.0 147.53 MB

An Exciting Deep Learning-based Flask web app that predicts the Facial Expressions of users and also does Graphical Visualization of the Expressions.

License: MIT License

Jupyter Notebook 39.29% Python 31.23% HTML 23.99% CSS 3.67% JavaScript 1.82%
cnn deep-learning flask opencv python wintercoding dwoc2020 open-source facial-expression-recognition emotion-detection

emotion-investigator's Introduction

Facial Emotion Investigator !

All Contributors

forthebadge made-with-python GitHub contributors GitHub forks GitHub Repo stars GitHub Repo Issues GitHub license PRs Welcome

๐Ÿ˜Ž About The Project: ๐Ÿ‘‡

Facial Expression Recognition Classifier Model :

Facial expression for emotion detection has always been an easy task for humans, but achieving the same task with a computer algorithm is quite challenging. With the recent advancement in computer vision and machine learning, it is possible to detect emotions from images.In this project,we propose a novel technique called facial emotion recognition using convolutional neural networks,python and flask. Facial expressions are the vital identifiers for human feelings, because it corresponds to the emotions. Most of the times (roughly in 55% cases), the facial expression is a nonverbal way of emotional expression, and it can be considered as concrete evidence to uncover whether an individual is speaking the truth or not.

โ›ณ Our Facial Expression Recognition Classifier Model can take input via following ways : ๐Ÿ‘‡

  • Real-time Video input
    nuetral
  • Upload Images from the System
    sad
  • Provide URL of the Image
    angry
    happy
  • It predicts the Emotion of users and also gives Graphical Visualization of Emotions as shown above.

โžฟ Tech Stack used ๐Ÿ‘‡

  • Python
  • Flask
  • HTML, CSS
  • Deep Learning (CNN)

๐Ÿ’ฅ Getting Started: Steps to run the Project in your local device !!

  • Fork this repository.
  • Clone the repository to your System using git clone
  • Example : git clone https://github.com<your-github-username>/Facial-Expression-Recognition-Classifier-Model
  • Create a new Virtual Environment with python 3.7.0 version.
  • Install all the dependencies with pip install -r requirements.txt.
  • Now run the main.py file.
  • Once it shows Running on http://127.0.0.1:5000/ go to http://127.0.0.1:5000/ in your browser.

๐Ÿ’ป Coding Structure:

  • Import the required Packages and Libraries.
  • Data analysis and Creating Training and Validation Batches.
  • Create a CNN using 4 Convolutional Layers including Batch Normalization, Activation, Max Pooling, Dropout Layers followed by Flatten Layer, 2 Fully Connected dense Layers and finally Dense Layer with SoftMax Activation Function.
  • Compile the model using Adam Optimizer and categorical cross entropy loss function.
  • Training the model for 15 epochs and then Evaluating the model as well as saving the model Weights in .h5 Values
  • Saving the model as JSON string.
  • Creating a Class in a separate file to reload the model and its weights to make predictions and return the probabilities of each emotion.
  • Creating one more class in a Separate file which takes in the Real-time Video input and returns frames of Images with a Circle detecting the face and putting text of its emotion on it.
  • A python script is also created which upon running yields the Graphical Visualization of Emotions present in the Image provided.
  • Finally creating a file which inherits form all the Classes defined by us and deploys our application using Flask.

Steps to Contribute to this Project ! ๐Ÿ‘‡

Go through the link If you are new to Open Source Contribution here on making your First Contribution !!

  • Fork this repository
  • Clone the repository to your System using git clone https://github.com<your-github-username>/Facial-Expression-Recognition-Classifier-Model
  • Create a branch :-
    • Change to the repository directory on your computer cd Facial-Expression-Recognition-Classifier-Model
    • Now create a branch using the git checkout command: git checkout -b your-new-branch-name
  • Make changes as per your requirement to solve the Issues mentioned in the Future scope of the Project and commit those changes.
  • If you go to the project directory and execute the command git status, you'll see there are changes. Add those changes to the branch you just created using the git add
  • Now commit those changes using the git commit command: git commit -m "Added the feature of Suggesting Music"
  • Push your changes to GitHub using the command git push origin <add-your-branch-name>
  • If you go to your repository on GitHub, you'll see a Compare & pull request button. Click on that button.
  • Now describe the changes you made and submit the pull request.
  • Wait for the Maintainers to review :)

Any sort of Contributions are always welcomed ๐ŸŽ‰

Excited to contribute to the Project ? Head over Open Issues here

Project Admin ๐Ÿ‘‡

SanjayMarreddi

Contributors ๐Ÿ”ฅ

Thanks to all these wonderful developers who made this project awesome!:raised_hands:

Open Source Programs

This Project is part of the following programs :

DevScript Winter of Code

Code of Conduct

You can find our Code of Conduct here.

License

This project follows the MIT License.

emotion-investigator's People

Contributors

abhik99 avatar allcontributors[bot] avatar amit366 avatar anushavc avatar bhagyashri2000 avatar bharath-acchu avatar dependabot[bot] avatar himanshu007-creator avatar muthuannamalai12 avatar palaniyappan-s avatar sanjaymarreddi avatar shaikyasmeen-mldl avatar swastik1710 avatar tharunc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

emotion-investigator's Issues

Improve the Validation Accuracy of the Model

You can try to improve the accuracy of the model by :

  • Tuning the Hyper Parameters like :
    Learning Rate, Epochs, Batch Size, Number of Layers in CNN, Number of filters ,Size of filters, Value in Dropout Layers, Optimizers
  • Using different Datasets.

Beautify and Improve the README

Try to incorporate the following features :

  1. Add all the Appropriate README Labels
  2. Reduce the Content and enhance it with Images
  3. Add a section for the Project Admin & Contributors
  4. Other things which you feel to be important

Feel free to look at the Popular Project Repo's and incorporate the above points accordingly to our Project !!

ImportError: libGL.so.1: cannot open shared object file: No such file or directory

ImportError: libGL.so.1: cannot open shared object file: No such file or directory
Traceback:
File "/usr/local/lib/python3.8/dist-packages/streamlit/script_runner.py", line 338, in _run_script
    exec(code, module.__dict__)
File "/root/Emotion-Investigator/main.py", line 3, in <module>
    import cv2
File "/usr/local/lib/python3.8/dist-packages/cv2/__init__.py", line 5, in <module>
    from .cv2 import *

how solved?

AttributeError: module 'utils' has no attribute 'datasets'

๐Ÿ› Bug Report

I get this error when i tried to train it on another dataset.
How can i solve this error :

AttributeError Traceback (most recent call last)
in
----> 1 utils.datasets.fer.plot_example_images(plt).show()

AttributeError: module 'utils' has no attribute 'datasets'

Add Contributing.md

I would like to add Contributing.md with the following features.

1.We can add Github documentation links for
i). Getting started with Git and GitHub
ii). Forking a Repo
iiI). Cloning a Repo
iv). How to create a Pull Request
2.Also, we can give the links for git installation
3.We can also add Style Guides for Git Commit Messages
These things will help people new to opensource understand clearly on how to create an issue and how to create a PR.

I would like to add this in a folder and incorporate it in the readme.

Integrate welcome bot

I can add a welcome bot config file having a proper message that will show up when any user will open up an issue or pull-request for the first time.
For reference, check out: https://github.com/apps/welcome

If you feel this is a great idea!
Please assign it to me.

CODE OF CONDUCT file

Hi @SanjayMarreddi
I found that this project repository is not having a code of conduct file in this repository ,
kindly assign me this issue and I would like to contribute a well formatted code of conduct file as you know code of conduct is a necessary file which the contributors need to follow so that everyone follows a decorum

ADD ISSUE_TEMPLATE

Hello there,
I would like to add an issue template for your repository. This template would have four issues namely bug, documentation, feature, proposal. Kindly assign me this issue as a part of DWOC.
THANK YOU

Think of Practical Applications and How to apply our project there ? ๐Ÿ’ก

Here are some popular Practical Applications of Facial Expression Recognition :

  • During Interviews
  • Students activeness during Online Education
  • Real-time monitoring of physically disabled patients.

STEPS to Proceed :

  1. Once you think of an Application, Try to figure out what additional Tech Stack is required to implement that.
  2. If you are already familiar with the Tech Stack, You can start working on it.
  3. If not and you are Interested in Learning those, We can provide resources or you can also explore online & the mentors will resolve queries.
  4. Finally, Open up a new Issue describing the Application and Solution and Start CONTRIBUTING !!!

Add a GitHub action to auto-assign Mentors for every PR

I would like to add a GitHub action to auto-assign mentors for every PR. It sometimes becomes hectic for the mentors to take a look at all the Projects for the PRs made by the Contributors. This action would give a nice notification about reviewing the pr and make things pretty easy for the mentor. It would automatically ask for reviews by the mentors on every pr created.

Demo :
auto assign

PR TEMPLATE

๐Ÿš€ Feature

I can add a pr template , which will have few checklists and options like uploading screenshots and describing about the pr etc , which will give better understanding of pr for the maintainer
(A clear and concise description of what the feature is.)

Have you read the Contributing Guidelines on Pull Requests?

Yes
(Write your answer here.)

Motivation

Self Motivation
(Please outline the motivation for the proposal.)

Pitch

This is a great feature like issue template in this project , this will give a better idea about the pr and also make the work easy
(Please explain why this feature should be implemented and how it would be used.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.