Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 1011 Bytes

README.md

File metadata and controls

31 lines (24 loc) · 1011 Bytes

EmotionRecognition

The simplest TensorFlow Emotion Recognition implementation using TensorFlow.

More details in Medium article: https://aruno14.medium.com/very-simple-emotion-recognition-290bd1db234e

Dataset

Folder structure

  • /
  • /train_emotion.py
  • /predict_emotion.py
  • /emotions/[test, train]/[angry, disgust, fear, happy, neutral, sad, surprise]

Model

  • Input size: (48, 48, 1)
  • Accuracy: 0.5658

How to use

  1. Download FER2013 dataset
  2. Create emotions folder
  3. Extract train and test folder in emotions folder
  4. Run train_emotion.py
  5. Add a face file named test.jpg
  6. Run predict_emotion.py

Convert to TensorFlowLite

python3 convert2tflite.py --model_folder=model_emotion/ --output=model_emotion.tflite

Convert to TensorFlowJS (with quantization)

tensorflowjs_converter model_emotion/ quantized_model_emotions/ --input_format tf_saved_model --output_format tfjs_graph_model --quantize_float16