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

 

        报错

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

问题分析:

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

解决方法:

pip install opencv_contrib_python 

posted @ 2019-02-28 16:54  苍洱  阅读(782)  评论(0编辑  收藏  举报