OpenCV: AttributeError: module 'cv2' has no attribute 'face'

后端 未结 7 1797
刺人心
刺人心 2020-12-21 12:14

I am creating a face recognition system using Python and OpenCV on these versions:

  • Python 3.6.2 :: Anaconda custom (64-bit)
  • Anaconda 4.3.23
  • O
相关标签:
7条回答
  • 2020-12-21 12:48

    Solution, as were found at OpenCV forum (and same at StackOverflow), works well for me:

    pip install opencv-python
    pip install opencv_contrib_python
    

    And in cv2 version 4.0.0 face recogniser can be created by using different function name, as mentionted above:

    face_recognizer = cv2.face.LBPHFaceRecognizer_create()
    face_recognizer = cv2.face.EigenFaceRecognizer_create()
    face_recognizer = cv2.face.FisherFaceRecognizer_create()
    
    0 讨论(0)
提交回复
热议问题