Simple Python program to track faces with your webcam using OpenCV. The accuracy is around 80-90% and should be fine for most testing Projects.
Use a video as input
cap = cv2.VideoCapture('video.mp4')
Use an image as input
img = cv2.imread('image.jpg')