Better Face Detection?


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.


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

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

Non commercial use only.



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

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.