2

Having spent a day detecting facing using Haar classifier (for frontal face), here's what I've figured out that it fails to recognize/detect faces where:

  • Head is slightly tilted to left or right, even with frontal shots
  • Thick moustache or beard
  • Non pale/white skin coloured faces (failed to detect several African faces, and few faces from Indian sub-continent)
  • Extreme mongoloid features
  • Faces that have even slight bit of shade, i.e. not a highly uniformly lit face

Have tried modifying the scaleFactor and minNeighbours, without success.

So, it essentially seems to boil down to able to detect a narrow range of faces in ideal photographs, including person being fair skinned, with upright faces (no head tilt), minimal facial hair, uniform lighting of the face etc.

Or, did I miss anything ? Any particular setting or step to update/insert ?

Is it documented anywhere as to what type of faces (positive IDs) were used to create the Haar Cascade XML that is bundled with OpenCV ?

OTOH, I found this excellent Q&A, but again, there are many other questions on SO indicating people have had little success in creating their own Haar Cascades (challenge seems to be in training correctly). Guidance on how to approach this would be very helpful.

Community
  • 1
  • 1
bdutta74
  • 2,798
  • 3
  • 31
  • 54
  • 1
    before you start training your own, try a few things: 1.) there's more than one cascade in the box. 2.) try CLAHE or bioinspired/retina for preprocessing, to adjust the lighting/color issues. 3.) add a profile-face cascade, and check 2 times with a flipped image. – berak Nov 18 '14 at 07:46
  • Thanks @berak. I am pretty new to OpenCV (& Computer Vision) in general, but I read up CLAHE (since I'd heard of before) and tried it. It certainly improved recognition for the uneven lighting scenario. However, I am not sure of how to solve the 'head tilt' issue. That seems to throw the classifier off fairly reliably. – bdutta74 Nov 18 '14 at 15:09
  • the tilting problem is inherent to the method. not much, that you can do there. – berak Nov 18 '14 at 15:48
  • For relatively close up images you could try using an eye classifier, hopefully detect both eyes, then either draw a box around these with enough room to encompass the usual size of a face/head (not very robust) or just rotating the image so that both eyes are roughly on the value Y value (this may solve the tilting head issue) – Aphire Feb 09 '15 at 17:30

0 Answers0