This is a web application created for facial emotion recognition and also a python script named face.py is created in which you can detect your emotions using opencv and that can be executed using the command python face.py. predict.py file is used to detect the emotions for images present in the EMOTOR_TEST.zip and generate predictions.csv.
- HTML
- Css
- JavaScript
- Python
- Tensorflow
- Keras
- OpenCV
- DeepFace
- Flask
- OpenCV
- Python / Python3 installed.
- Latest version of
pipinstalled.
- Open your terminal.
- Clone this repository in any directory of your choice.
https://github.com/kasv-p/SOI-ML.git
- Run the following command to move into the cloned repository.
cd SOI-ML
- Later run the following commands to install the required libraries and modules
pip install -r requirements.txt
- Once the setup is complete, the web-app can be opened by executing a python script named app.py using the command
python app.pyand application can be seen on port 5000 with the url loalhost Port 5000. Use Ctrl+C inside the terminal to stop.
Once the app is setup, you can host the web-app using only step 5.
- Once you start the web app the camera opens up by default and detects the emotion you stop the camera by using start/stop button.
- Navigation bar can be used to go to the image uplaod section and detect emotion section.
- In the image upload section you can determine the emotion of our own image by uploadin the image and can get the result after the page get reloaded.
- For the live detection of emotion we have used model created by us and for the image upload part we used DeepFace module to get the emotion detected.
- EMOTOR.ipynb file contains the python script to the models we tried.
- kaggle.json file should be uploaded to download dataset from kaggle.
- fer2013.csv should be uploaded to colab.
- Documentation for ML model is named as
Documentation_EMOTOR.pdf
CNN Model couldn't be incorporated as it's size was around 150MB and would not be feasible to store in github. The model can be downloaded fom Google Drive.
- Link to Model: CNN Model