JsFlo / EmotionRecTraining

Python script using Keras + TensorFlow to train a custom machine learning model to recognize faces using a dataset with human faces and labeled with emotions.
33 stars 19 forks source link
keras tensorflow tensorflow-examples tensorflow-serving

EmotionRecTraining

Python script using Keras + TensorFlow to train a custom machine learning model to recognize faces using a dataset with human faces and labeled with emotions.

I wrote an article explaining this script and model architecture and that can be found here: https://medium.com/@jsflo.dev/training-a-tensorflow-model-to-recognize-emotions-a20c3bcd6468

Training

Script: emotionRecTrain.py

Required args:

Optional args:

Running

# required
python3 emotionRecTrain.py --csv_file=data/fer2013.csv --export_path=model_out/

python3 emotionRecTrain.py --csv_file=data/fer2013.csv --export_path=model_out/ --batch_size=50
python3 emotionRecTrain.py --csv_file=data/fer2013.csv --export_path=model_out/ --n_epochs=5000
python3 emotionRecTrain.py --csv_file=data/fer2013.csv --export_path=model_out/ --debug