import face_recognition as fr # Each face is tuple of (Name,sample image) known_faces = [('Obama','sample_images/obama.jpg'), ('Peter','sample_images/peter.jpg'), ] def face_rec(file): """ Return name for a known face, otherwise return 'Uknown'. """ for name, known_file in known_faces: if compare_faces(known_file,file): return name return 'Unknown'