Ask Your Question
1

How to train images for smile detection?

asked Feb 5 '16

Tatu gravatar image

I want to do a smile detection project from images in opencv. I have installed opencv-3.1.0 with gcc and cmake. I have downloaded human faces database from AT and T. Now, how do i start training of them? I am quite noob and stuck. So i would appreciate an elaborate explanation to start and work with it from anyone out here.

Preview: (hide)

Comments

1

have you seen opencv's smile-cascade detector ?

what is your plan ?

att_faces might not be the best database for this, you'd have to annotate/label your data manually, and it's probably too small (on its own)

berak gravatar imageberak (Feb 5 '16)edit

1 answer

Sort by » oldest newest most voted
5

answered Feb 5 '16

In order to get more images, you can use GENKI-4k Face, Expression, and Pose Dataset [1]

The GENKI-4K dataset contains 4,000 face images spanning a wide range of subjects, facial appearance, illumination, geographical locations, imaging conditions, and camera models. All images are labeled for both Smile content (1=smile, 0=non-smile) and Head Pose (yaw, pitch, and roll parameters, in radians).

I have used this database to train a smile classifier using LBP + SVM approach (some years ago) and results were quite satisfactory. Steps:

  • (1) Face detection
  • (2) Get Local Binary Pattern from the face
  • (3) SVM classification

Step (2) can be decomposed in:

  • crop face region
  • normalize face region based on eye coordinates
  • histogram equalization or something similar
  • Apply LBP to a NxM non-overlapping region

The public GENKI-4K dataset is available for download here [2].

[1] http://mplab.ucsd.edu/wordpress/?page...

[2] http://mplab.ucsd.edu/wordpress/wp-co...

Two sample images:

image description

Preview: (hide)

Comments

I would do a mouth detection and classify just the mouth, IMHO the info in the face is not as good as only the info in the mouth area, am I wrong?

thdrksdfthmn gravatar imagethdrksdfthmn (Feb 5 '16)edit
3

You would be surprised how much a smile influences the face region and thus the descriptor!

StevenPuttemans gravatar imageStevenPuttemans (Feb 5 '16)edit

Maybe you are right, the eyes shape change, there are some lines that appear...

thdrksdfthmn gravatar imagethdrksdfthmn (Feb 5 '16)edit
2

And even contours/curves that are not so visible like cheecks or eyebrow position.

StevenPuttemans gravatar imageStevenPuttemans (Feb 5 '16)edit
1

I agree with @StevenPuttemans

Did you use SVM lib of OpenCV or any framework such as: scikit-learn?

hoangnh gravatar imagehoangnh (Oct 18 '16)edit

Question Tools

1 follower

Stats

Asked: Feb 5 '16

Seen: 964 times

Last updated: Feb 05 '16