some questions about chapter 7

60 views
Skip to first unread message

赵东城

unread,
May 13, 2016, 12:07:48 AM5/13/16
to OpenCV with Python Blueprints

Hello Michael
Is this code suitable for linux , i just run the code in ubuntu and ,the test button can not be clicked, it is very strange. It just says that there should be at least one input
thank you very much




Michael Beyeler

unread,
May 13, 2016, 12:43:03 AM5/13/16
to OpenCV with Python Blueprints
Hi,

You need to first record a training set, before the test button can be clicked. There is a specific workflow to the project, which is explained in my book in Chapter 7 and in the source code of "chapter7/chapter7.py":

"""OpenCV with Python Blueprints Chapter 7: Learning to Recognize Emotion in Faces
An app that combines both face detection and face recognition, with a
focus on recognizing emotional expressions in the detected faces.
The process flow is as follows:
* Run the GUI in Training Mode to assemble a training set. Upon exiting
the app will dump all assembled training samples to a pickle file
"datasets/faces_training.pkl".
* Run the script train_test_mlp.py to train a MLP classifier on the
dataset. This file will store the parameters of the trained MLP in
a file "params/mlp.xml" and dump the preprocessed dataset to a
pickle file "datasets/faces_preprocessed.pkl".
* Run the GUI in Testing Mode to apply the pre-trained MLP classifier
to the live stream of the webcam.
"""

Let me know if you have more questions.

Best,
Michael
Message has been deleted

赵东城

unread,
May 13, 2016, 7:16:29 AM5/13/16
to OpenCV with Python Blueprints
yeah I have solved this question because that the training data is not enough,thanks for your answers very much

在 2016年5月13日星期五 UTC+8下午12:07:48,赵东城写道:

Michael Beyeler

unread,
May 13, 2016, 11:12:52 AM5/13/16
to OpenCV with Python Blueprints
You're welcome. Let me know if you run into any other issues.
Reply all
Reply to author
Forward
0 new messages