I used python to code.
FaceDetection.py is to open your computer camera to detect your face.
FaceDateCollection.py is to collect your face images and save them in Facedata folder.
face_trainning.py is to train, and save training information in face_trainner folder.
FaceRecognition.py is to recognize, after training.
Attention, you maybe change the path in the code correspondingly.