0
$\begingroup$

I have installed OpenCV and IntraFace, now the code can detect landmarks on the face, like this :

enter image description here

Now how can I convert this to a smile detector?

I have the landmark points as an array, so I should probably first find which ones belong to the mouth. How can I do that? Are there any tutorials for IntraFace? I could not find any.

Any help would be appreciated. Thanks !

$\endgroup$
2
$\begingroup$

IntraFace has an expression detector built in. However, if you would like to do a custom smile detector, then what you should do is to convert your spatial facial fiducial points to some kind of a feature vector, which could be input to a non-linear classifier such as SVM or MLP.

A trivial way to do this would be to use angular relations (if the face is fronto-parallel) or else you could use projective invariants such as cross ratio to find out the geometric relationships.

Two types of classifiers can be trained :

Two-Class: You would first prepare a training set of smiling and non-smiling people. Then train your learning machine with this input.

Novelty-Detection : If you use something like GMM or a variant of SVM you could model only the smile features (build a hyper-envolope around those features). And then during the runtime, you could query if the test feature falls into this hyper-envelope or not.

Finally, regarding the mouth part : You are right that it can help you, and IntraFace would have that built in. In the worst scenario, you might not need to separate anything. If you have a good training set you could as well run a dimensionality reduction on your features.

Of course there are more advanced methods published to accomplish what you like to do. Just as an example here.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.