mrhysjones / emotion-classifiers

SVM classifiers built for emotion classification

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SVM Emotion Classifier

Multiclass support vector machine classifier for emotion classification of human faces.

Originally developed during a summer research project with Hristo Georgiev and Abhijat Biswas. Process tweaked and more databases added to the training data whilst developing my final year project

Emotions currently classified:

  • Anger
  • Contempt
  • Disgust
  • Fear
  • Happy
  • Neutral
  • Sad
  • Surprise

Databases used

Several databases were used to train the classifier. Due to the nature of the face tracker used, only the frontal face images were used in the training process.

The training data itself has not been included in this repository. Please visit the individual database websites below for more details on data available and obtaining the data.

Training Process

  1. Facial landmarks are obtained for the datasets (assumed to be in a Datasets directory) using the FaceTracker Library. The resultant vectors of landmarks are then categorised by their class label i.e. Angry . See facetrack.py for more details.
  2. Distance measures are calculated from the facial landmarks to obtain feature set. See calculatefeatures.py for details
  3. Principal Component Analysis on distance measures to find principal features. See pca.py for more details.
  4. SVM training on principal components using LIBSVM. This will produce a graphic (see below) for cross validation of the classifier. See svm.py for more details.

Cross Validation Plot

Example of training process

python facetrack.py

python calculatefeatures.py

python pca.py

python svm.py emotions.train

This will produce files from the PCA process, as well a model and range file for the SVM classifier.

About

SVM classifiers built for emotion classification


Languages

Language:Python 98.0%Language:C++ 2.0%