face_classification icon indicating copy to clipboard operation
face_classification copied to clipboard

Face Detection: replace OpenCV by dlib

Open docteurZ opened this issue 7 years ago • 5 comments

Hello,

Given the high rate of false alarms, this PR proposes to replace OpenCV by dlib when detecting faces. Speed is also preserved. Further details/comments can be found in a dlib post.

Thanks for your work,

Hugo

docteurZ avatar Aug 05 '17 17:08 docteurZ

Sorry Hugo I have been busy (thesis). I will try to review the PR as soon as possible since I have no previous experience with dlib.

Thank you for your PR.

oarriaga avatar Aug 08 '17 07:08 oarriaga

Replacing OpenCV with dlib will definitely improve the accuracy of the face detection model. It will also reduce the false positives which are being detected as faces right now. Looking forward to this PR being merged.

mayank26saxena avatar Aug 26 '17 21:08 mayank26saxena

Dlib should add huge value add. Both in terms of accuracy and speed.

bozzmob avatar Oct 31 '17 11:10 bozzmob

The gender_emotion demo runs a bit slower for me with dlib. OpenCv is good enough and runs fast.

Dlib is more accurate but a few filters can be added to opencv (minimum bounding box dimensions and tracking) to increase accuracy of face detection.

mirceaciu avatar Nov 13 '17 13:11 mirceaciu

On my machine with a fairly fast CPU (and a GTX 1080 Ti GPU) the original OpenCV-based version uses ~45 % of all CPUs. The new proposed Version with Dlib uses a lot less resources - just one CPU. Works well for me.

stucksubstitute avatar Mar 05 '18 13:03 stucksubstitute