eduardolundgren / tracking.js

A modern approach for Computer Vision on the web
http://trackingjs.com
Other
9.44k stars 1.45k forks source link

Face detection for colored people #115

Closed karneaud closed 8 years ago

karneaud commented 9 years ago

Why doesn't your facial detection work for people of color?

alxstuart commented 9 years ago

What environment have you found his issue to happen in? Obviously different skins tones can lead to minor differences, but it's quite possible your issue is something to do with thresholds not being able to pick up the difference. I've just tested it with a battery of multicultural celebrities and every face has been detected, so I imagine you are under poor lighting and thus the system is struggling to find the contrast points needed to detect a face using Haar Features, as is explained here.

karneaud commented 9 years ago

works on images but i had to adjust the contrast and brightness on the image itself for it to work. i can probably let the camera test i did slide....my room probably doesn't have the right lighting.

Does your framework offer the ability for me to make adjustments to compensate for colored people? where can i start?

alxstuart commented 9 years ago

Viola Jones creates its own thresholds using machine learning, so not directly. However, changing the colour space the HSV prior to the image may make some difference; it has been proposed in papers as an area for improvement. HSV canvas libraries are readily available elsewhere on github so shouldn't be too difficult to implement.

Although as a disclaimer, I'm not one of the dev team. Just a fan and user!

karneaud commented 9 years ago

thanks for the tips @alxstuart