Better Face Detection?

Hi,

I’ve been using ofxCvHaarFinder to pull faces out of a still image. It’s been working well, but I do get a lot of false positives, as well as sometimes missing real faces altogether.

I’ve experimented with the scaleHaar setting, and tried a few different Haar files (“haarcascade_frontalface_alt_tree.xml” seems to work best for me), but I’m struggling to improve it any further.

Can anyone recommend ways of improving the accuracy?

This is for quite hi-res still images - it doesn’t need to work on realtime video.

Thanks

Perhaps you could take a look at Kyle’s ofxFaceTracker:

https://github.com/kylemcdonald/ofxFaceTracker

“ofxFaceTracker is openFrameworks addon for face tracking, based on Jason Saragih’s FaceTracker library.”

Non commercial use only.

Cheers,

Joel

here is also a good reference from Kyle on how these are working.

https://github.com/kylemcdonald/AppropriatingNewTechnologies/wiki/Week-2

In my experience it is helpful to try and isolate the face from the background. Haar detection is pretty brute force and is looking for pretty simplified/abstracts of what it is trying to detect. With faces I have seen it pick up door frames, ceiling patterns as they kinda look like a T-shape that it is trying to match your nose/eyes to.

Background subtraction however is harder given you are using stills. Using hi-res images probably won’t make that much of a difference either as the Haar process isn’t really looking for a lot of detail.