AttributeError: 'module' object has no attribute 'face'

 

        报错

raceback (most recent call last):
  File "D:/work/python/face_ai/predict.py", line 41, in 
    face_recognizer = cv2.face.LBPHFaceRecognizer_create()
AttributeError: 'module' object has no attribute 'face'

问题分析:

主要原因是OpenCV的扩展模块Opencv_contrib没有找到的原因。

解决方法:

pip install opencv_contrib_python 

转载于:https://www.cnblogs.com/a9999/p/10451498.html

你可能感兴趣的:(AttributeError: 'module' object has no attribute 'face')