The Aim of the project is to provide a holistic website for easy access to ML models via a clean Interface a and options for users
Project 1: Emotion Detection System.
This project aims to classify the emotion on a person's face into one of seven categories, using deep convolutional neural networks. The model is trained on the FER-2013 dataset which was published on International Conference on Machine Learning (ICML). This dataset consists of 35887 grayscale, 48x48 sized face images with seven emotions - angry, disgusted, fearful, happy, neutral, sad and surprised.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
We follow a systematic Git Workflow -
- Create a fork of this repo.
- Clone your fork of your repo on your pc.
- Add Upstream to your clone
- Every change that you do, it has to be on a branch. Commits on master would directly be closed.
- Make sure that before you create a new branch for new changes,syncing with upstream is neccesary.
-
Fork the repo and clone it.
-
Go in the repo and setup virtual environment using
python -m virtualenv venv
-
Then activate the environment using
On Windowssource venv/Scripts/activate
On MacOS/Linuxsource venv/bin/actiavte
-
Install requirements
pip install -r requirements.txt
-
Change into the
./proj
directory.All the following steps are to be executed in the proj directory.
-- below two are optional steps --
-
set secret key for your django project.
-
You can use [https://djecrety.ir/] to generate your secret key
-
After the above setup, run
python manage.py makemigrations
python manage.py migrate
-
Start the backend server
python manage.py runserver
Runs the backend server at default port8000
.
Open http://localhost:8000 to view it in the browser.
The page will reload if you make edits.
- If you are adding any new requirements for the project, make sure that you are adding it to
requirements.txt
- Django 3.0 - The web framework used in the project.
- Tensorflow - Framework used to train and test the models and responses
- Postgres - Backend DB used to store final responses from the Tensorflow Emotion Detection Model
We use SemVer for versioning.
-
Download the FER-2013 dataset from here and unzip it inside the src folder. This will create the folder data.
-
If you want to train this model, use:
cd model
python emotions.py --mode train
- If you want to view the predictions without training again, you can download the pre-trained model from here and then run:
cd model
python display.py
- This implementation by default detects emotions on all faces in the webcam feed. With a simple 4-layer CNN, the test accuracy reached 63.2% in 50 epochs.