AttributeError:部分初始化的模块“人脸识别”没有属性“人脸编码”

2024-09-28 01:26:48 发布

您现在位置:Python中文网/ 问答频道 /正文

我正试图在谷歌上找到的下面给定链接的帮助下,用python制作人脸识别脚本。 https://www.mygreatlearning.com/blog/face-recognition/

我已安装:

  • OpenCV
  • dlib
  • 人脸识别

图书馆

也为CMake安装Visual C++。

现在我正试图使用上面链接中给出的代码“从面部提取特征”

运行脚本时,出现以下错误:

Traceback (most recent call last):
  File "C:\Users\ajay.arora2\AppData\Local\Programs\Python\Python38-32\extract_features_from_face.py", line 2, in <module>
    import face_recognition
  File "C:\Users\ajay.arora2\AppData\Local\Programs\Python\Python38-32\face_recognition.py", line 32, in <module>
    encodings = face_recognition.face_encodings(rgb)
AttributeError: partially initialized module 'face_recognition' has no attribute 'face_encodings' (most likely due to a circular import)

我已尝试重新安装人脸识别模块

请建议任何解决方法。 提前谢谢


Tags: 脚本most链接localusersappdatafileface

热门问题