Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Smile Detection (Any alternative other than OpenCV ?)

Is there any library alternative to OpenCV which detects smile.

I dont want to use OpenCV as it sometimes fails to detect faces due to background.

Any one knw other library ? other than OpenCV ?

like image 917
Tariq Avatar asked May 03 '11 07:05

Tariq


4 Answers

I would recommend having a look at The Machine Perception Toolbox (MPT Library). I had a chance to play with it a bit at an Openframeworks OpenCV workshop at Goldsmiths and there is a c++ smile detection sample available.

I imagine you can try the MPT Library for iPhone with openframeworks or simply link to the library from an iphone project.

sometimes fails to detect faces due to background.

An ideal lighting setup will guarantee better results, but given that you want to use this on a mobile device, you must inform your users that smile detection might fail under extreme conditions (bad lighting)

HTH

like image 197
George Profenza Avatar answered Oct 25 '22 07:10

George Profenza


How are you doing smile detection? I can't see a smile-specific Haar dataset in the default OpenCV face detection cascades. I suspect your problem is training data rather than OpenCV itself.

like image 36
regularfry Avatar answered Oct 25 '22 09:10

regularfry


Egawer is a good starting point if you need a working app to begin with.

https://github.com/Atrac613/egawer-iOS

I checked the training images of smileD_haarcascade_v0.05, an found that they include the full face. So, it seems to be a "smiling face" detector rather than a smile detector alone. While this seems easier, it can also be less accurate.

The best is to create your own Haar Cascade XML file, but admittedly most of us developers don't have time for that. You can improve the results considerably by equalizing the brightness of the image.

like image 1
Totoro Avatar answered Oct 25 '22 08:10

Totoro


iOS 7 now has native support of simile detection in CoreImage. Here is the API diff:

For iOS 7, Yes, now you can do it with CoreImage.

Here is the API diff in iOS 7 Beta 2:

CoreImage

CIDetector.h

Added CIDetectorEyeBlink

Added CIDetectorSmile

like image 1
X.Y. Avatar answered Oct 25 '22 09:10

X.Y.