File size: 404 Bytes
9a2caf8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import face_recognition as fr
import pickle
import os
def img_enc(face):
encoded={}
faces = fr.load_image_file(face)
face_enc = fr.face_encodings(faces)[0]
encoded[face.split(".")[0]] = face_enc
return list(encoded.keys()),list(encoded.values())
# face_known,face_enco_done= img_enc()
# with open("data.pickle","wb")as f:
# pickle.dump((face_known,face_enco_done),f)
|