AttributeError: module 'cv2.cv2' has no attribute 'createLBPHFaceRecognizer'

前端 未结 12 841
伪装坚强ぢ
伪装坚强ぢ 2020-11-30 04:28

I am facing some attribute error while running face recognizing the code. My face detects code run perfectly.But while I try to run the face recognizing code it shows some a

12条回答
  •  南方客
    南方客 (楼主)
    2020-11-30 05:24

    Use the following

    recognizer = **cv2.face.LBPHFaceRecognizer_create()**
    

    After you install:

    pip install opencv-contrib-python
    

    If using anaconda then in anaconda prompt:

    conda install pip
    

    then

    pip install opencv-contrib-python
    

提交回复
热议问题