The other day, when I tried to detect facial feature points using dlib, I ran into this error
Traceback (most recent call last):
File "dlib.py", line 33, in <module>
detector = dlib.get_frontal_face_detector()
AttributeError: module 'dlib' has no attribute 'get_frontal_face_detector'
It seemed that the environment was built properly because dlib was imported, but when I actually tried to use dlib, an AttributeError was thrown.
After a lot of research, the solution is written in stackoverflow here. I did.
Rename your file from dlib.py to something else, say dlib_project.py.
Apparently the problem was that the file name was dlib.py
.
I changed the file name to getFacialLandmarks.py
and it worked fine.
It seems better not to give the same file name as the library name ...
Recommended Posts