ageitgey / face_recognition

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

Attribute Error: 'Module' object has no attribute 'cnn_face_detection_model_v1' #164

Closed sadhanareddy007 closed 7 years ago

sadhanareddy007 commented 7 years ago

Hi,


  I got error like 'module' object has no attribute 'cnn_face_detection_model_v1'
How to solve this can you please tell me.

 What I Did is
conda install python
conda install numpy
conda install scipy
conds install dlib
conda --no-dependecies install face_recognition
conda install face_recognition_models

when i am trying to run i got the error

Thanks in advance
sadhanareddy007 commented 7 years ago

When i am trying to upgrade dlib using "conda install --upgrade dlib" command it is showing like unrecognized arguments: --upgrade

When i am trying using "pip install --upgrade dlib" command it is showing like 'Failed building wheel for dlib'

ageitgey commented 7 years ago

The error "Module' object has no attribute 'cnn_face_detection_model_v1" is because the version of dlib you are using is too old (that was added in dlib version 19.5). Probably the version of dlib provided by conda is out of date.

I don't use Anaconda myself, so I can't really help with conda issues. One of the disadvantages of using Anaconda is you are sort of limited to whatever versions of packages their maintainers have provided.

I guess you could try using an earlier version of face_recognition that doesn't require the latest dlib release. Using face_recognition version 0.2.2 instead of version 1.0.0 might work for you.

sadhanareddy007 commented 7 years ago

I got the output.... anyways thank u so much for your valuable reply......

sadhanareddy007 commented 7 years ago

Hi, When i am trying to Get the locations and outlines of each person's eyes, nose, mouth and chin and digital make-up on a image consists of 4 Persons but it is applying the locations and outlines, digital make up to only one person at one time. How can we apply the outlines and digital makeup to all persons at one time please give me any idea...

lolstatsguy commented 7 years ago

Assuming the example. You can load the image before the the loop. Run the loop for each face. Show the picture after.

imperator-maximus commented 6 years ago

I installed dlib from source. and "pip show dlib" results in Name: dlib Version: 19.8.99 Summary: A toolkit for making real world machine learning and data analysis applications Home-page: https://github.com/davisking/dlib Author: Davis King Author-email: davis@dlib.net License: Boost Software License Location: /Users/imperator/anaconda/lib/python3.5/site-packages/dlib-19.8.99-py3.5-macosx-10.6-x86_64.egg which is newer than 19.5 I would say and no conda dlib installed. but I am getting the same error... so any idea what to do?

zjmuhsin commented 6 years ago

Hi I followed the following steps to install dlib on Linux server: cd dlib mkdir build cd build cmake .. cmake --build . --config Release make install

but also got a similar error: detector = dlib.get_frontal_face_detector() AttributeError: module 'dlib' has no attribute 'get_frontal_face_detector'

Any help would be really appreciated - Thank you.

Aditi1Singh commented 6 years ago

Did you figure out the solution? I'm having the same error, and I don't know what to do. AttributeError: module 'dlib' has no attribute 'get_frontal_face_detector'

awaiskaleemtnr commented 6 years ago

Anything??

laddiexu commented 6 years ago

I find the solution now. It is because Anaconda has installed dlib with early version. You can verify it by first pip uninstall dlib, then in python env, import dlib, dlib. version . You can find dlib still can be import, and version is lower than 19.5. The solution is: conda uninstall dlib, then install a newer one.

StudyQGuo commented 5 years ago

I find the solution now. It is because Anaconda has installed dlib with early version. You can verify it by first pip uninstall dlib, then in python env, import dlib, dlib. version . You can find dlib still can be import, and version is lower than 19.5. The solution is: conda uninstall dlib, then install a newer one.

I've sloved my problem by using you advise. I unistall the lower dlib and then install the latest version. It works. Thank you!

DPEJW commented 5 years ago

I find the solution now. It is because Anaconda has installed dlib with early version. You can verify it by first pip uninstall dlib, then in python env, import dlib, dlib. version . You can find dlib still can be import, and version is lower than 19.5. The solution is: conda uninstall dlib, then install a newer one.

I was using the Pycharm and dlib 19.18.0, still got this error, any idea why?

Daniyalasif129 commented 4 years ago

i have lattest version of DLIB and update show me that you are using the latest version but still has same error...any solution

murugan-bala commented 4 years ago

I got the output.... anyways thank u so much for your valuable reply......

how u got ouput..same error facing me .. pls help