ageitgey / face_recognition

The world's simplest facial recognition api for Python and the command line
MIT License
53.62k stars 13.51k forks source link

AttributeError: module 'dlib' has no attribute 'get_frontal_face_detector' #440

Open afarane opened 6 years ago

afarane commented 6 years ago

Description

Installations . Note: No Conda installation on my Machine

What I Did

I Ran this File : https://github.com/afarane/Face_Recognition/blob/master/AFR.py

Gives Me Following Error . Why ?

Traceback (most recent call last): File "0_iFaces.py", line 3, in import face_recognition File "C:\Users\username\AppData\Local\Programs\Python\Python36-32\lib\site-pac from .api import load_image_file, face_locations, batch_face_locations, File "C:\Users\username\AppData\Local\Programs\Python\Python36-32\lib\site-pac face_detector = dlib.get_frontal_face_detector() AttributeError: module 'dlib' has no attribute 'get_frontal_face_detector'

vinitmuchhala commented 6 years ago

Have the same issue, let me know if you found a solution yet

Napolcc commented 6 years ago

I meet the same problem when I run face_recognition programs on Mac.

awaiskaleemtnr commented 6 years ago

Anything? I do see a solution here but no clue how they resolved this */pyc file"

https://stackoverflow.com/questions/39518871/attributeerror-module-object-has-no-attribute-get-frontal-face-detector

ageitgey commented 6 years ago

They just mean they deleted any *.pyc files that were in that folder.

MyFlowerGirl commented 5 years ago

me too

anigno commented 5 years ago

after installing dliv with setup.py, had that problem. solved by opening "Available packages" and installing dlib from there. (had to pip install numpy also)

Hamiltonsjtu commented 5 years ago

re-install dlib works for me. pip uninstall dlib pip install dlib OS: windows 10

bamwani commented 4 years ago

lol you just can't name the file as "dlib.py" coz you're importing dlib. which will result in importing itself. so just rename the file to anything.py.

Geethavani-droid commented 4 years ago

where i can find dlib.py

vidya414 commented 4 years ago

AttributeError: module dlib has no shape predictor. Can any one help me.

jhonnysrinivas commented 4 years ago

AttributeError: module dlib has no shape predictor. Can any one help me.

i am facing the same issue .

PhoenixZX200 commented 4 years ago

this is really irritating i am getting the same errors

punitha-valli commented 4 years ago

@ageitgey @vinitmuchhala @Hamiltonsjtu @bamwani @Napolcc return self.face_detector(image, 1) AttributeError: 'PRN' object has no attribute 'face_detector'

Mohdyusuf786 commented 4 years ago

after installing dliv with setup.py, had that problem. solved by opening "Available packages" and installing dlib from there. (had to pip install numpy also)

How had you solved it

Mohdyusuf786 commented 4 years ago

after installing dliv with setup.py, had that problem. solved by opening "Available packages" and installing dlib from there. (had to pip install numpy also)

I also installed dlib from setup.py and after that i had installed pip install face-recognition but getting same error

huzaifa-99 commented 3 years ago

has anyone found the answer?

PhoenixZX200 commented 3 years ago

I have found the solution I used python 3.6.4 version and it worked!!!!! Also install cmake

sibujacob commented 3 years ago

I have found the solution I used python 3.6.4 version and it worked!!!!! Also install cmake

how man please help me

i think all are bull shitting on this issue

BVishal-Geek commented 3 years ago

AttributeError: module dlib has no shape predictor. Can any one help me.

you have to download the dlib models. just type dlib models git and u will find models, download them and paste the path in your code.

sibujacob commented 3 years ago

Hi

What was my question ?

On Fri, Oct 15, 2021 at 2:00 AM Vishal_bakshi @.***> wrote:

AttributeError: module dlib has no shape predictor. Can any one help me.

you have to download the dlib models. just type dlib models git and u will find models, download them and paste the path in your code.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ageitgey/face_recognition/issues/440#issuecomment-943706527, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKFWQDCPKTYG63ANXMW7SNTUG44U3ANCNFSM4EZQKBHQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

liuli996624 commented 3 years ago

AttributeError: module 'dlib' has no attribute 'get_frontal_face_detector' 试过上面的各种方法都不行。还有其他的方法吗

LussRus commented 2 years ago

You can check that your method are exist in module:

for method in dir(obj):
    if callable(getattr(obj, method)):
        print(method)

will print into console all avaible methods

zoekimm commented 2 years ago

I tried re-installing dlib but still facing the same issue on Mac.

tneilc commented 2 years ago

Try it on a different python version such as 3.6.5 or 3.8.5