Deep Face Detection Library in TensorFlow for Python
RetinaFace
RetinaFace is the face detection module of insightface project. The original implementation is mainly based on mxnet. Then, its tensorflow based re-implementation is published by Stanislas Bertrand.
This repo is heavily inspired from the study of Stanislas Bertrand. Its source code is simplified and it is transformed to pip compatible but the main structure of the reference model and its pre-trained weights are same.
Installation
The easiest way to install retinaface is to download it from pypi.
pip install retina-face
Face Detection – Demo
RetinaFace offers a face detection function. It expects an exact path of an image as input.
from retinaface import RetinaFace
resp = RetinaFace.detect_faces("img1.jpg")
Then it returns the facial area coordinates and some landmarks (eyes, nose and mouth) with