Ask Your Question

TypeError: Incorrect type of self(must be 'face_faceRecognizer' or its derivative

asked 2018-02-21 04:51:52 -0500

Guru VM gravatar image

updated 2018-02-21 05:36:12 -0500

berak gravatar image

Hi, I am trying to execute face recognition code(opencv 3.4 and python2.7), i get the following error : TypeError: Incorrect type of self(must be 'face_faceRecognizer' or its derivative.

the code and defect attached

recognizer = cv2.face_LBPHFaceRecognizer()

if os.path.exists("model.yaml"):"model.yaml")

Can you please help me fix this.

edit retag flag offensive close merge delete


please, no screenshots of TEXT ...

berak gravatar imageberak ( 2018-02-21 04:59:19 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2018-02-21 05:12:28 -0500

berak gravatar image

try a :

>>> help(cv2.face)

and it should be:

recognizer = cv2.face.LBPHFaceRecognizer_create()
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-02-21 04:51:52 -0500

Seen: 2,962 times

Last updated: Feb 21 '18