Planning the app
The final app will consist of a main script that integrates the process flow end-to-end, from face detection to facial expression recognition, as well as some utility functions to help along the way.
Thus, the end product will require several components:
chapter7
: The main script and entry-point for the chapter.chapter7.FaceLayout
: A custom layout based ongui.BaseLayout
that operates in two different modes:- Training mode: In the training mode, the app will collect image frames, detect a face therein, assign a label depending on the facial expression, and upon exiting, save all the collected data samples in a file, so that it can be parsed by
datasets.homebrew
. - Testing mode: In the testing mode, the app will detect a face in each video frame and predict the corresponding class label by using a pre-trained MLP.
- Training mode: In the training mode, the app will collect image frames, detect a face therein, assign a label depending on the facial expression, and upon exiting, save all the collected data samples in a file, so that it can be parsed by
chapter3.main
: The main function routine to start the GUI application.detectors.FaceDetector
: A class for face detection.-
detect
: A method to detect faces in a grayscale...
-