I am getting an error while importing the face_recognition library. I have tried using a Virtual Environment too. Please help.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Program Files\Python38\lib\site-packages\face_recognition-1.3.0-py3.8.egg\face_recognition\__init__.py", line 7, in <module>
from .api import load_image_file, face_locations, batch_face_locations, face_landmarks, face_encodings, compare_faces, face_distance
File "C:\Program Files\Python38\lib\site-packages\face_recognition-1.3.0-py3.8.egg\face_recognition\api.py", line 17, in <module>
face_detector = dlib.get_frontal_face_detector()
AttributeError: module 'dlib' has no attribute 'get_frontal_face_detector'
Version: Python 3.8 OS: Windows 10
You need to download the face database shape_predictor_68_face_landmarks
, you need to download it and unzip it and put it in the folder where your code is located
Face Library Download Link:http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.