How to detect low resolution faces (small faces) in an image using opencv python

asked 2015-12-08 02:05:28 -0600

I'm currently working on a project where I need to analyze thousands of medium-resolution photos, detect visible faces and blur them out. I've read quite a bit about OpenCV (and spent a day building and playing around with it), and I feel that it's the right direction to solve this problem.

Currently, I have gotten pretty far along with OpenCV, to the point where I can process a photo, pass it to the detectMultiScale() function and use one of the provided Haar cascade files to detect a good number of faces.

However, the hit rate is still pretty abysmal no matter how I play around with the function parameters, or which cascade file I use (frontalface_default vs. frontalface_alt vs. frontalface_alt_tree). I'm perfectly fine with some false positives and false negatives, but I'm nowhere near the rate I'd call acceptable.

:I just copied the details from another question because i have same problem

edit retag flag offensive close merge delete

Comments

1

Take some things into considerations

  • The included face detector is trained on frontal view images of faces, if they change orientation of viewpoint, then the detector will fail.
  • The model has 24x24 pixel dimensions which will immediatly lead to the smallest face detectable. If your face is smaller, then start by upscaling the original image first!

Could you give some more info on this?

StevenPuttemans gravatar imageStevenPuttemans ( 2015-12-08 03:49:53 -0600 )edit