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 Answers
1
votes
I would go with following steps:
Training
- 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.
- Extract the features of each face.
- Normalize the whole dataset. Get the bounding box around faces and cut them from images. Also, normalize the sizes of each face.
- Align the faces by using Roll and Eye coordinates which can be acquired from Google API.
- Train an SVM(validate it, etc).
Testing
- Acquire an image.
- Extract the features.
- Normalize and align the face.
- Use SVM.
Library that I suggest:
scikit-learn - SVM
OpenCV - Image Manipulations