Alejandro Simkievich
Alejandro Simkievich

Reputation: 3792

Viola-Jones face detection: high contrast among pixels

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?

Upvotes: 0

Views: 131

Answers (1)

Raff.Edward
Raff.Edward

Reputation: 6544

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.

Upvotes: 1

Related Questions