We use the haarcascade_frontalface_default.xml for implementing this.
Please refer haarcascades.
Save the xml file in your cwd.
Captures 100 images and outputs a yaml file (custom face cascade model).
face_cascade = cv2.CascadeClassifier("path/to/haarcascade_frontalface_default.xml")
face_recognizer = cv2.face.LBPHFaceRecognizer_create()
Iterates through all the available yaml files in your locale and predicts the input using nearest neighbour algorithm.
label, confidence = face_recognizer.predict(predicted face region)
Integration of CV2 window with tkinter for more window controls. (Under Development)