O'Reilly logo

OpenCV with Python Blueprints by Michael Beyeler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Facial expression recognition

The facial expression recognition pipeline is encapsulated by chapter7.py. This file consists of an interactive GUI that operates in two modes (training and testing), as described earlier.

In order to arrive at our end-to-end app, we need to cover the following three steps:

  1. Load the chapter7.py GUI in the training mode to assemble a training set.
  2. Train an MLP classifier on the training set via train_test_mlp.py. Because this step can take a long time, the process takes place in its own script. After successful training, store the trained weights in a file, so that we can load the pre-trained MLP in the next step.
  3. Load the chapter7.py GUI in the testing mode to classify facial expressions on a live video stream in real-time. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required