We need to change the path to the path where our model and pictures are.

In [2]:
os.chdir("C:\\Users\\DavorJordačević\\Desktop\\OpenCV Face Detection")

Define parameters:

In [3]:
# DNN stands for OpenCV: Deep Neural Networks
DNN = "TF" # Or CAFFE, or any other supported framework
min_confidence = 0.5 # minimum probability to filter weak detections