face_rec
face_rec copied to clipboard
Error while running face_rec.py
Hi,
I am getting following error while running face_rec.py. Any suggestions?
Traceback (most recent call last):
File "face_rec.py", line 199, in <module>
frame = detect_and_display(model, video_capture, face_detector, open_eyes_detector,left_eye_detector,right_eye_detector, data, eyes_detected)
File "face_rec.py", line 95, in detect_and_display
encoding = face_recognition.face_encodings(rgb, [(y, x+w, y+h, x)])[0]
File "C:\Users\xxx\AppData\Local\Continuum\anaconda3\envs\ddd\lib\site-packages\face_recognition\api.py", line 209, in face_encodings
raw_landmarks = _raw_face_landmarks(face_image, known_face_locations, model="small")
File "C:\Users\xxx\AppData\Local\Continuum\anaconda3\envs\ddd\lib\site-packages\face_recognition\api.py", line 155, in _raw_face_landmarks
face_locations = [_css_to_rect(face_location) for face_location in face_locations]
File "C:\Users\xxx\AppData\Local\Continuum\anaconda3\envs\ddd\lib\site-packages\face_recognition\api.py", line 155, in <listcomp>
face_locations = [_css_to_rect(face_location) for face_location in face_locations]
File "C:\Users\xxx\AppData\Local\Continuum\anaconda3\envs\ddd\lib\site-packages\face_recognition\api.py", line 46, in _css_to_rect
return dlib.rectangle(css[3], css[0], css[1], css[2])
Boost.Python.ArgumentError: Python argument types in
rectangle.__init__(rectangle, numpy.int32, numpy.int32, numpy.int32, numpy.int32)
did not match C++ signature:
__init__(struct _object * __ptr64, long left, long top, long right, long bottom)
__init__(struct _object * __ptr64)
Same problem
I received this error... [LOG] Collecting images ... 0it [00:00, ?it/s] [LOG] Encoding faces ... 0it [00:00, ?it/s]
any ideas what's wrong? Where do i place my own images?
I received this error... [LOG] Collecting images ... 0it [00:00, ?it/s] [LOG] Encoding faces ... 0it [00:00, ?it/s]
any ideas what's wrong? Where do i place my own images?
Create the dir inline with dataset dir and name it as faces and in that create your name dir (i.e amol) and place your img in the folder
faces dir structure should be like:
faces/
amol/ ### 1 picture
anything.jpg
barak/ ### 1 picture
anything.jpg
extension should be .jpg
Hi,
I am getting following error while running face_rec.py. Any suggestions?
Traceback (most recent call last): File "face_rec.py", line 199, in <module> frame = detect_and_display(model, video_capture, face_detector, open_eyes_detector,left_eye_detector,right_eye_detector, data, eyes_detected) File "face_rec.py", line 95, in detect_and_display encoding = face_recognition.face_encodings(rgb, [(y, x+w, y+h, x)])[0] File "C:\Users\xxx\AppData\Local\Continuum\anaconda3\envs\ddd\lib\site-packages\face_recognition\api.py", line 209, in face_encodings raw_landmarks = _raw_face_landmarks(face_image, known_face_locations, model="small") File "C:\Users\xxx\AppData\Local\Continuum\anaconda3\envs\ddd\lib\site-packages\face_recognition\api.py", line 155, in _raw_face_landmarks face_locations = [_css_to_rect(face_location) for face_location in face_locations] File "C:\Users\xxx\AppData\Local\Continuum\anaconda3\envs\ddd\lib\site-packages\face_recognition\api.py", line 155, in <listcomp> face_locations = [_css_to_rect(face_location) for face_location in face_locations] File "C:\Users\xxx\AppData\Local\Continuum\anaconda3\envs\ddd\lib\site-packages\face_recognition\api.py", line 46, in _css_to_rect return dlib.rectangle(css[3], css[0], css[1], css[2]) Boost.Python.ArgumentError: Python argument types in rectangle.__init__(rectangle, numpy.int32, numpy.int32, numpy.int32, numpy.int32) did not match C++ signature: __init__(struct _object * __ptr64, long left, long top, long right, long bottom) __init__(struct _object * __ptr64)
this error is related to dlib library
did you have windows 8 sdk installed if yes then retarget the sdk you can find docs on how to retraget the sdk and if no download the sdk restart your computer and reinstall dlib using pip and your good to go
Hi,
I am getting following error while running face_rec.py. Any suggestions?
Using TensorFlow backend.
Traceback (most recent call last):
File "C:\Users\Acer\AppData\Local\Programs\Python\Python38\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 64, in
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "face_rec.py", line 7, in
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors
for some common reasons and solutions. Include the entire stack trace above this error message when asking for help.
ImportError: DLL load failed while importing _pywrap_tensorflow_internal: A dynamic link library (DLL) initialization routine failed.
Check if your CPU support AVX if it doesn't support the AVX then you need to downgrade the tensorflow version to 1.5
https://github.com/gitkwr/Install_Instructions-Win10-Deeplearning-Keras-Tensorflow
this link will help you install the tensorflow