Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
I want my computer to learn what my face looks like when I am in a certain mood(self defined, not just happy and sad) via webcam and then predict the mood I am likely in(in per cent, not binary) by having given it training. Like http://auduno.github.io/clmtrackr/examples/clm_emotiondetection.html but tailored to me and not a generic classifier.

I did some research and it seems that I need to use a haar classifier. I looked into AForge und Accord, finding FaceHaarCascade. But this is not just generic, it also is binary. And it only detects faces, not emotions. At least I need to give it some facial expressions to choose the most likely one from and give the percentage of each.

How do you do it with aforge/accord?

Clarification: I would like to know, how to create a haar classifier with aforge or accord, so I can input 1000 pictures from me in one mood, 1000 pictures in another mood, let machine-learning create decision trees and finally use it. Aforge/Accord already offers this*, but there is no documentation for this task. I also thought that the eyes and nose are more important for mood as you can also laugh in a fake way(with wrinkles around eyes being tense). Basically I would let machine learning decide what makes my face express a certain emotion.

*Accord Vision offers HaarCascade and HaarClassifier whereas HaarCascade offers a method called FromXml which imports HaarCascades from OpenCV XML. For this I need to create an opencv-xml, which leads me to http://note.sonots.com/SciSoftware/haartraining.html but something like haartraining -data haarcascade -vec samples.vec -bg negatives.dat -nstages 20 -nsplits 2 -minhitrate 0.999 -maxfalsealarm 0.5 -npos 7000 -nneg 3019 -w 20 -h 20 -nonsym -mem 512 -mode ALL does not work, this is where I am stuck there. EDIT: It does work with npos < number of included pos. pictures.

Also, using the HaarObjectDetector, it does not offer a threshold output but rather a binary It is the object/It is not the object. What I want is % of each mood, ie similarity to certain faces not a "this is where you are happy/unhappy" type of result.
Posted
Updated 13-Mar-15 23:23pm
v7
Comments
Sergey Alexandrovich Kryukov 13-Mar-15 16:15pm    
Expected by who? :-)
"Easiest way..."? Is your concern having and easy life? :-)
—SA
Larissa Schön 13-Mar-15 16:24pm    
How does this help me?
Sergey Alexandrovich Kryukov 13-Mar-15 16:38pm    
How? Better question is "why should it help?"
Here is the real help I would advise: realize that this task is not realistic at all (wasn't it obvious for you?) and give up, save your time for something useful.
No, I'm not saying that nothing can be done. You probably think that computer vision or "face detection" is somehow close to emotions? This a very naive thought. "Face detection" does not really recognize faces as some mistakenly think. It just locate the face on the picture recognizing the eyes on the background of general typical face shape. The purpose is to set optical focus of the camera to make faces sharper, maybe suggest some composition clues, things like that...
Emotions are more of research without too sound progress, a direction in of top-notch futuristic fields of technology and science.
—SA
Larissa Schön 13-Mar-15 16:42pm    
Which qualification do you base this statement on?
Sergey Alexandrovich Kryukov 13-Mar-15 16:44pm    
Sorry, just intuition... To me, it's not too little. :-)
—SA

1 solution

Please see my comments to the question. You can always find some links on the topic:
http://www.amazon.com/Unmasking-Face-Recognizing-Emotions-Expressions/dp/1883536367[^],
http://emotion.caltech.edu/papers/Adolphs2002Recognizing.pdf[^],
http://www.cs.ucf.edu/courses/cap6411/lect1012h.PDF[^],
http://bit.ly/19htK4F[^].

Despite of plenty of publications, I'm pretty much skeptical at this time. It's likely that your opinion is different. I hope you can recognize this: :-)

—SA
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900