0

We are using Viola-Jones for face detection. The algorithm works pretty well, with virtually no false positives. However, we have false negatives. We detected one very clear pattern for false negatives, which is a very high contrast between the grey scale value of the face pixels versus the background pixels.

For false negatives, if the image were converted to a single gray scale matrix, we would see something like this - 255 indicates white pixels, that is background, while much lower values are face (i.e darker) pixels)

255 255 255 255 255 255 80
255 255 255 255 255 110 100
255 255 255 255 90  100 110
255 255 255 90 100  105 100

In those circumstances, the algorithm is failing to detect the face. I tried our own code and a web available api, with similar results (neither one detected a face on the relevant pictures.

For true positives, the contrast is not that high and you may see something like this:

215 203 193 180
205 196 182 175
199 195 186 183
202 201 197 193
209 204 196 187
214 202 185 172
198 182 171 159
192 174 164 156

Where the higher values are the background pixels (witish but not completely white, they have some grey) and the lower values correspond to the face (darker).

Has anyone faced this problem and/or has any suggestions?

Alejandro Simkievich
  • 3,512
  • 4
  • 33
  • 49
  • There exist much better algorithm than Viola-Jones face detection today, please google "dlib , create your own object detector". If you need best recall, google "Easily Create High Quality Object Detectors with Deep Learning ". – StereoMatching Oct 22 '16 at 02:27
  • hey StereoMatching, thanks a lot, this is an awesome article. – Alejandro Simkievich Oct 22 '16 at 15:46

1 Answers1

1

If the issue is contrast, there are a number of contrast normalizations algorithms out there. Try them as a pre-processing step and see if it helps.

Raff.Edward
  • 6,404
  • 24
  • 34
  • Thanks Ralf, I tried open cv's histogram equalization with mixed results. I get as many false negatives as before, just different ones. – Alejandro Simkievich Jan 21 '16 at 02:03
  • There is more than just that one algorithm. Search for several and try them - otherwise, perhaps the contrast isn't your actual issue? – Raff.Edward Jan 21 '16 at 16:30