Git Product home page Git Product logo

awesome-face-detection's Introduction

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)
s3fd : HD --> 1/8 scale. low resolution but awesome performance!
insightface(retianface_r50_v1) : VGA(640x360)

Test on Intel i7-6700K & GTX1080.

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

Test on Intel Xeon E5-1660 & NVIDIA GV100.

ocv-dnn ocv-haar dlib-hog dlib-cnn fr-hog fr-cnn mtcnn S3FD insightface
16.76ms 32.95ms 124.35ms 24.58ms 121.73ms 24.88ms 292.45ms 31.07ms TBA

Test on MacBook pro 2018 i5.

ocv-dnn ocv-haar dlib-hog dlib-cnn fr-hog fr-cnn mtcnn S3FD insightface
46.53ms 88.47ms 174.81ms 3276.62ms 174.63ms 3645.53ms 928.75ms 271.18ms TBA

Requirements

  • Python 3.7
  • OpenCV 4.1.1 (option: build from src with highgui)
  • Dlib 19.17.0
  • face_recognition 1.2.3
  • pytorch 1.2.0
  • mxnet-cu100 1.5.1.post0

Usage

First, install libs

pip install opencv-contrib-python
pip install torch
pip install dlib
pip install face_recognition
pip install easydict
pip install mxnet-cu100
pip install insightface

Second, prepare weight file (s3fd)

download s3fd weight: https://drive.google.com/open?id=1Dyr-s3mAQEj-AXCz8YIIYt6Zl3JpjFQ7

[ROOT DIR]/S3FD/weights/s3fd.pth

Last, 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

s3fd

insightface(retinaface)

awesome-face-detection's People

Contributors

tkwoo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.