0

AttributeError: module 'cv2.cv2' has no attribute 'createLBPHFaceRecognizer' I restarted my windows but still its not working

recognizer=cv2.face.createLBPHFaceRecognizer_create()
pppery
  • 3,731
  • 22
  • 33
  • 46
  • 1
    Possible duplicate of [AttributeError: module 'cv2.cv2' has no attribute 'createLBPHFaceRecognizer'](https://stackoverflow.com/questions/44633378/attributeerror-module-cv2-cv2-has-no-attribute-createlbphfacerecognizer) – wovano Jul 19 '19 at 00:11

1 Answers1

1

You have a typo in your code. The method is called LBPHFaceRecognizer_create, not createLBPHFaceRecognizer_create.

The following works for me (after installing opencv-contrib-python):

import cv2
recognizer = cv2.face.LBPHFaceRecognizer_create()
wovano
  • 4,543
  • 5
  • 22
  • 49