/mtcnn-pytorch

pytorch implementation of face detection algorithm MTCNN

Primary LanguagePython

mtcnn-pytorch

pytorch implementation of face detection algorithm MTCNN

Usage MTCNN

Just download the repository and then do this

from src.detector import detect_faces
from src.utils import show_bboxes
from PIL import Image

image = Image.open('images/test3.jpg')
bounding_boxes, landmarks = detect_faces(image)
image = show_bboxes(image, bounding_boxes, landmarks)
image.show()

Requirements

  • pytorch 0.4
  • Pillow, numpy

Credit

This implementation is heavily inspired by:

Reference

MTCNN: Joint Face Detection and Alignment using Multi-task Cascaded Convolutional Networks.