esimov / pigo

Fast face detection, pupil/eyes localization and facial landmark points detection library in pure Go.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Too many false detections

dimuls opened this issue · comments

I'm using pigo in my realtime app and observing many false detections. How can i reduce amount of them? Does pigo have some parameters to adjust?

You have to play with the various parameters provided by the library. In general to reduce the false positive rates you have to consider the detection window over you are running the face detector. Also there are three core components responsible for the detection score: iou, shift and scale. I would recommend first to try modifying the first two options. Read the documentation and also this blog post: https://www.esimov.com/2019/07/pigo-face-detection-library.

If the obtained results are still not satisfying please provide me a sample image with the applied parameters and i will try to help you.

1

On this image with params iou=0.2, shift=0.1, scale=1.1 pigo detected face in rectangle (171,331)-(271,431).

This kind of false detections occurs regularly on random frames when i'm processing live stream with pigo. Gocv with lbpcascade_frontalface_improved.xml under the same conditions (same video streams) gives no false detections.

I read documentation but didn't find any hints how to adjust this params. I can try to adjust them randomly but maybe you can speed up this process.

Another problem i faced: rarely pigo detects face with too large scale (more larger than actual face).

I have tried with the default parameters and also with the parameters you have provided but no face have been detected. If you download the attached image and run over it pigo with the default parameters it should not detect any face.

Regarding the last issue, the scale param has nothing to do with the face dimension. To detect large faces, I mean faces with the rectangular area greater than the min and max values, you have to adjust these values.

Since I haven't received any feedback i'm closing this issue. You can reopen at any time.