akshaybahadur21 / Facial-Recognition-using-Facenet

A simple implementation of facial recognition using facenets for humans 🧔 🔍
MIT License
280 stars 143 forks source link

TypeError: 'NoneType' object is not iterable #2

Open sekharBuddha opened 6 years ago

sekharBuddha commented 6 years ago

Traceback (most recent call last): File "rec-feat.py", line 112, in recognize() File "rec-feat.py", line 103, in recognize extract_face_info(img, img_rgb, database,ear) File "rec-feat.py", line 59, in extract_face_info name, min_dist = recognize_face(image, database) TypeError: 'NoneType' object is not iterable

akshaybahadur21 commented 6 years ago

please provide full stack trace

sarkarsaikat commented 6 years ago

Line: name, min_dist = recognize_face(image, database) in "def extract_face_info(img, img_rgb, database,ear):" gives this error.

Traceback (most recent call last):

File "", line 1, in runfile('C:/.../Documents/Python Scripts/Facial/Facial-Recognition-using-Facenet-master/rec-feat.py', wdir='C:.../Documents/Python Scripts/Facial/Facial-Recognition-using-Facenet-master')

File "C:...\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 705, in runfile execfile(filename, namespace)

File "C:...\AppData\Local\Continuum\anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile exec(compile(f.read(), filename, 'exec'), namespace)

File "C:/.../Documents/Python Scripts/Facial/Facial-Recognition-using-Facenet-master/rec-feat.py", line 113, in recognize()

File "C:/.../Documents/Python Scripts/Facial/Facial-Recognition-using-Facenet-master/rec-feat.py", line 104, in recognize extract_face_info(img, img_rgb, database,ear)

File "C:/.../Documents/Python Scripts/Facial/Facial-Recognition-using-Facenet-master/rec-feat.py", line 60, in extract_face_info name, min_dist = recognize_face(image, database)

TypeError: 'NoneType' object is not iterable

harrytsz commented 5 years ago

I am curious if this problem has been solved?So sad, I have encountered the same problem.

achmadrrb commented 1 year ago

check if your image is valid. i've faced the same problem, my problem was because there was a .DS_Store file on macOS. if not, check the image if there is a face on the image