zakirhussain
zakirhussain

Reputation: 1

i'm getting attribute error even after i updated my opencv using opencv-contrib-python

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

recognizer=cv2.face.createLBPHFaceRecognizer_create()

Upvotes: 0

Views: 75

Answers (1)

wovano
wovano

Reputation: 5094

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()

Upvotes: 1

Related Questions