Trying out OpenCV's deep face detector to have a feel of how it works.

Today I tried out OpenCV’s deep face detector to have a feel of how it works. I basically followed the Face Detection with OpenCV and Deep Learning tutorial from pyimagesearch.

The deep face detector in OpenCV is based on the Single Shot Detector (SSD) framework with a ResNet deep architecture (as opposed to the Haar Cascade method which is not based on deep neural networks). The network is pre-trained using Caffe. All I had to do is to load the Caffe prototxt file and Caffe model file to recreate the network, then feed images through it to make predictions. The confidence level is returned as part of the prediction results. Only predictions above a certain confidence threshold are kept and drawn on the images as bounding boxes.

This out-of-the-box face detector actually works pretty well: