improving face detection accuracy [closed]
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.
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.
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.)
no, you should use a downscaled version of your image, but keep the aspect ratio intact, like W/2, H/2
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.