Implement the face recognition method.