Open hanckmail opened 6 years ago
For example, Im using the following code
import face_recognition import pickle all_face_encodings = {} img1 = face_recognition.load_image_file("obama.jpg") all_face_encodings["obama"] = face_recognition.face_encodings(img1)[0] img2 = face_recognition.load_image_file("biden.jpg") all_face_encodings["biden"] = face_recognition.face_encodings(img2)[0] # ... etc ... with open('dataset_faces.dat', 'wb') as f: pickle.dump(all_face_encodings, f)
When biden.jpg image is corrupted or have more than one face i got this error IndexError: list index out of range how can i pass this image and error without script stopping. Thank you.
IndexError: list index out of range
See https://github.com/ageitgey/face_recognition/wiki/Common-Errors#list-index-out-of-range-errors
thank you i will try
For example, Im using the following code
When biden.jpg image is corrupted or have more than one face i got this error
IndexError: list index out of range
how can i pass this image and error without script stopping. Thank you.