Face detection is a machine learning technique which detects face in a image.This is normally done by trianing a model and using it for later for face detection.We will provide images that has faces and train the model,such that it is able to learn what is a face and how it looks like?
There are many methods or algorithms used for face detection. One of the best method to detect a face is using HOG ,which creates a feature descriptor for images and feed into a classifier model. Mostly SVM is used for classifications.
In DLIB.we use HOG+SVM to detect a face in image.This all are done internally.DLIB already contains a pretrained model that detects face at the runtime .In this blog, we are going to use the pretrained model for face detection in a image.
STEP 1: IMPORT THE LIBRARIES
CV2 -> to convert images to numpy array