improving face detection accuracy

asked 2018-12-10 07:44:12 -0500

I have tried CascadeClassifier on several photos from my collection and the results are promising, but far from perfect. I can tweak parameters so that all faces that I could reasonably expect to be detected are detected. However, most of the time garbage is also detected as face. Is there any other approach that I could use to filter out the items from CascadeClassifier which are not faces? A tutorial would be most welcome, but any tip is also greatly appreciated.

edit retag flag offensive close merge delete

Comments

1

Since this looks like offline processing, you can try some other expensive methods to detect faces with better accuracy, less false detection, for instance:

If reducing the number of false detections is more important for you than the detection accuracy, you can try to use multiple methods to detect faces (Cascade of classifiers + DNN face detection) and retain only faces that are detected by both methods.

Eduardo gravatar imageEduardo ( 2018-12-10 08:20:50 -0500 )edit

Thanks a lot for the tips. I had a look at the DNN thing. Indeed looks good, but it seems it needs images at 300x300 pixels. Is there any function that would chop the input image into appropriate subimages (covering whole input image, possibly overlapping, possibly of different scale)? Or do I need to experiment with image preprocessing myself? (BTW, I guess your comment should have been an answer.)

Tomasz Grobelny gravatar imageTomasz Grobelny ( 2018-12-10 10:25:18 -0500 )edit

but it seems it needs images at 300x300 pixels

no, you should use a downscaled version of your image, but keep the aspect ratio intact, like W/2, H/2

berak gravatar imageberak ( 2018-12-10 23:01:17 -0500 )edit

What if my input picture is not square? I guess I should leave black stripes on one side. What if my input picture scaled to 300x300 would have faces of 2x2? I think some chopping might be necessary to get reasonable results for my input pictures.

Tomasz Grobelny gravatar imageTomasz Grobelny ( 2018-12-11 02:30:14 -0500 )edit