Skip to content

The simplest TensorFlow Emotion Recognition implementation using TensorFlow.

License

Notifications You must be signed in to change notification settings

aruno14/emotionRecognition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

The simplest TensorFlow Emotion Recognition implementation using TensorFlow.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages