-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
module 'face_recognition_models' has no attribute 'face_locations' #6
Comments
you can change name .py file, maybe this is duplicate name |
I have the same error |
You are importing the wrong module. Use face_recognition not face_recognition_models. |
Hi Adam, thank you for your answer. '[3]: runfile('C:/Users/sasa/.spyder-py3/temp.py', wdir='C:/Users/sasa/.spyder-py3') File "", line 1, in File "C:\Programming\anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 705, in runfile File "C:\Programming\anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile File "C:/Users/sasa/.spyder-py3/temp.py", line 9, in ModuleNotFoundError: No module named 'face_recognition'>' |
This is my code: import cv2 cv2.namedWindow("preview") face_locations = [] if vc.isOpened(): while rval: face_locations = face_recognition.face_locations(frame) |
From the import error, it seems like you haven't actually installed |
i cant import it i find error and i dont know why help me please |
how can i import face_recignition from pycharm |
Check whether you have created face_recognition.py file in your code. If yes then change the name of the file. Its interfeering with existing file of face_recognition module. |
when i am running the below line of code :
face_recognition_models.face_locations(rgb,model="cnn")
I am getting this error:
module 'face_recognition_models' has no attribute 'face_locations'
face_recognition_models contains same functions of face_recognition but why i am getting this error.
The text was updated successfully, but these errors were encountered: