Source: Deep Learning on Medium
The Code Part
The main logic of our code part is simple here, check the Python code below:
First, you need load the model, which should be used to make some face detections and about how to train your model part I’ll cover it in my following posts or you can reach me by email for more details. Here we use OpenCV’s utility method to read the video clipse, and for every frame we captured, we use our model to make face detection. For each face detected part, we draw it with rectangle and right confidence labeled. Here’s our drawing method below:
Here’s our method to load the face detection model:
Does It Work ?
Well, definitely it worked. Check the short video below.