2

I’m getting AttributeError: module ‘cv2.face’ has no attribute ‘createLBPHFaceRecognizer’ for the following code snippet.

[apcode language=”python”]

import cv2
cascade = "haarcascade_frontalface_default.xml"
face_Cascade = cv2.CascadeClassifier(cascade)
recog = cv2.face.createLBPHFaceRecognizer()

[/apcode]

in line 4: [apcode language=”python”]

recog = cv2.face.createLBPHFaceRecognizer()

[/apcode]

can you please help me out? alternatives for this code snippet is appriciated.

Answered question