1
votes

I wish to use Google Cloud Vision API to generate features from images, that I will further use to train my SVM for emotion recognition problem. Please provide a detailed procedure for how to write a script in python that can use Google Cloud Vision API to generate features that I can directly feed into SVM.

1

1 Answers

1
votes

I would go with following steps:

Training

  1. Create a dataset(training + testing) for whichever emotions you want(such as anger, happy, etc.). This dataset must be diverse but balanced in terms of gender and age.
  2. Extract the features of each face.
  3. Normalize the whole dataset. Get the bounding box around faces and cut them from images. Also, normalize the sizes of each face.
  4. Align the faces by using Roll and Eye coordinates which can be acquired from Google API.
  5. Train an SVM(validate it, etc).

Testing

  1. Acquire an image.
  2. Extract the features.
  3. Normalize and align the face.
  4. Use SVM.

Library that I suggest:

scikit-learn - SVM

OpenCV - Image Manipulations