Skip to content

Compare with various detectors - dlib, ocv, ocv-dnn, mtcnn-pytorch, face_recognition

Notifications You must be signed in to change notification settings

eyebies/awesome-face-detection

 
 

Repository files navigation

Awesome face detection

Compare face detectors - Dlib, OpenCV, Others..


We are neighborhood



Processing time

Test image size : HD (720p)

We wanted to check processing time on same condition. but It couldn't becasue each method demand different input size. (ex. opencv dnn use 300x300 bgr image.)

So, Each code has a different image size.

ocv-dnn : 300x300
ocv-haar, dlib-hog, dlib-cnn, fr-hog, fr-cnn : VGA(640x360)
mtcnn : HD(1280x720)

Test on Intel i7-6700K & GTX1080.

ocv-dnn ocv-haar dlib-hog dlib-cnn fr-hog fr-cnn mtcnn
17.79ms 42.31ms 108.61ms 42.17ms 108.50ms 39.91ms 334.38ms

Test on MacBook pro retina 2014 mid.

ocv-dnn ocv-haar dlib-hog dlib-cnn fr-hog fr-cnn mtcnn
46.53ms 88.47ms 174.81ms 3276.62ms 174.63ms 3645.53ms 928.752ms

Requirements

  • Python 3.6
  • OpenCV 3.4.0 (option: build from src with highgui)
  • Dlib 19.10.0
  • face_recognition 1.2.1
  • pytorch 0.3.1

Usage

First, install libs

pip install opencv-contrib-python
pip install torch
pip install dlib
pip install face_recognition

Second, check run-time for each algorithm.

./run.sh

Of course, You can execute each file. and watch the result image (need opencv high gui)

python dlib-hog.py

Now, Select face detector you need!



Reference

opencv haar cascade

opencv caffe based dnn (res-ssd)

dlib hog

dlib cnn

face-recognition (dlib-based)

mtcnn

About

Compare with various detectors - dlib, ocv, ocv-dnn, mtcnn-pytorch, face_recognition

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.0%
  • Shell 1.0%