I'm using a pre-trained model with an accuracy of 68.7% over FER 2013 dataset. Thanks to @elfadly for providing with the pre trained model. If you wish to train your own model download FER2013 from Kaggle https://www.kaggle.com/c/challenges-in-representation-learning-facial-expression-recognition-challenge/data
For more insight on the opencv part check out my previous repo- meme_generator Will be adding better face detection classifiers soon
Download the trained model from the links given in source/trained-model.txt and place them in the same folder
python3 nnModel.py