Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
OpenCV with Python Blueprints

You're reading from  OpenCV with Python Blueprints

Product type Book
Published in Oct 2015
Publisher Packt
ISBN-13 9781785282690
Pages 230 pages
Edition 1st Edition
Languages
Authors (2):
Michael Beyeler Michael Beyeler
Profile icon Michael Beyeler
Michael Beyeler (USD) Michael Beyeler (USD)
Profile icon Michael Beyeler (USD)
View More author details

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. This step involves loading several pre-trained cascade classifiers as well as our pre-trained MLP classifier. These classifiers will then be applied to every captured video frame.

Assembling a training set

Before we can train an MLP, we need to...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}