Requirements
- NodeJs. If you don't have Nodejs installed, install it from here
- Python (Both the Python 2 as well as Python 3 are supported)
- Clone this repo. Change to the newly made directory '
Emotion-Recognition
' - Change the working directory to
frontend
- Run the command
node server.js
- Open your browser and browse to
localhost:3000
- Click on
Try out
button - The result will be shown on the screen.
- Click again on the same button to get another prediction.
The project aims to create a webapp that will recognise a person's emotions live in the browser. It can also be further developed to include some nice applications.
As of now, the model has been trained from scratch with keras, using TensorFlow backend. The model architecture is shown below.
94% accuracy is fine for most purposes, yet it has a lot of room for improvement. Soon going to turn to data augmentation to increase the data avialable for training by performing various modifications on existing data like, rotation, zooming in/out, cropping etc. This prevents overfitting and gives a more reliable model. The webapp is yet to be implemented. Will be implemented soon.
-
./backend
: Contains the backend part of the project. It contains a file namedtrain.ipynb
that has the code to train this model from scratch, if you wish to. It also contains the images used for training the model (original source). Just clone this repository and uncompress the contents and you're ready to go! -
./frontend
: Contains the frontend part of the project.
- The Webapp works fine on PCs, however you can't currently run it in the browser itself.
- The model is slightly biased currently due to the imbalance of images in the dataset. Will retrain on a sampled dataset once I get over with my exams;)