detect_face finds faces in the background with a greater confidence
leonvictor opened this issue · comments
Hey, first of all, thanks for the great lib. I've been playing around with face detection on the Mc-Master Pain Shoulder dataset to extract bounding boxes and am facing some issues.
In some cases, detect_faces returns multiple bounding boxes. No big deal, except that it gives a greater confidence to the wrongly detected background parts for no apparent reason.
Any idea why this could be happening ? Or how I can detect mishaps like this one ? If you have any idea how I can fix this let me know, I'd be glad to contribute.
Thanks
Hi @leonvictor , detect_face( )
function actually uses resnet10
backbone with ssd
object detection method.
- resnet10 is not so deep. It's a lightweight network.(That is why, it is able to run on real time input). So, it is not perfect.
- The model being used here is actually trained on data where face is at a distance from the camera. If the face is close to the camera, (ie) if the face is occupying larger part of the image, it will struggle to detect / will return multiple detections. I have experienced this myself.
In this case I would suggest to use the frontal face detector in dlib
. If execution time is not an issue, you can try the cnn face detector in dlib. Checkout this blog post to learn more.