The whole process can be divided in three major steps -
The first step is to find a good database of faces with multiple images for each individual.
The next step is to detect faces(you can use opencv for facedetection) in the database images and use them to train the face recognizer(for face recognizer i think you should use DNN like CNN-best for image processing).
The last step is to test the face recognizer to recognize faces it was trained for.