System overview

In this section, we will explain the process to apply the trained model in your application. Given a face image, we detect and process each face separately. Then, we find landmarks and extract the face region. The image features are extracted and passed to kmeans to obtain a 1,000-dimensional feature vector. PCA is applied to reduce the dimension of this feature vector. The learned machine learning model is used to predict the expression of the input face.

The following figure shows the complete process to predict the facial expression of a face in an image:

System overview

The process to predict a facial expression in a new image

Get OpenCV 3 Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.