AttributeError: module 'dlib' has no attribute 'face_recognition_model_v1'报错,有没有大佬能讲一下啊
望采纳!!!点击回答右侧采纳即可!!!
'AttributeError: module 'dlib' has no attribute 'face_recognition_model_v1''这个错误信息表明,在您的代码中使用了dlib库中不存在的属性'face_recognition_model_v1'。可能是因为您使用了过时或不正确的版本的dlib库,或者是因为您在使用不同版本的dlib库时,在代码中使用了不兼容的API。
解决办法:
检查您当前使用的dlib库版本是否为最新版本,并确保您使用的是正确的版本。
如果您在使用不同版本的dlib库时,在代码中使用了不兼容的API,请更新代码并使用与当前dlib库版本兼容的API。
运行上述代码错误,是因为您没有下载人脸模型shape_predictor_68_face_landmarks,你可以下载并解压缩它,然后将其放在代码所在的文件夹中。(你这里是model子文件夹下)
附:
shape_predictor_68_face_landmarks人脸库下载链接:http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2