Face_recognition: AttributeError: module 'dlib' has no attribute 'get_frontal_face_detector'

Created on 9 Apr 2018  路  13Comments  路  Source: ageitgey/face_recognition

  • face_recognition version:
  • Python version:3.6.5 (64bit)
  • dlib version: 19.10
  • Operating System: win7(64)

Description

Installations .
Note: No Conda installation on my Machine

  • pip3 install numpy

  • pip3 install scipy

  • pip3 install dlib

  • pip3 install Pillow

  • pip3 install --no-dependencies face_recognition

  • pip3 install face_recognition_models

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\ProgramsPythonPython36-32\lib\site-pac
from .api import load_image_file, face_locations, batch_face_locations,
File "C:\Users\username\AppData\Local\ProgramsPythonPython36-32\lib\site-pac
face_detector = dlib.get_frontal_face_detector()
AttributeError: module 'dlib' has no attribute 'get_frontal_face_detector'

Most helpful comment

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.

All 13 comments

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

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

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

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

me too

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)

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

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.

where i can find dlib.py

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

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

i am facing the same issue .

this is really irritating
i am getting the same errors

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dharam1890 picture dharam1890  路  3Comments

cjosephson picture cjosephson  路  5Comments

paulaceccon picture paulaceccon  路  5Comments

Jakubeeee picture Jakubeeee  路  3Comments

ramineniraviteja picture ramineniraviteja  路  5Comments