how to solve cv2.face_LBPHFaceRecognizer object has no attribute 'load' ?

asked 2018-03-12 23:16:31 -0500

Edocit gravatar image

I used the attribute read() instead of load() to bring .yml file into my project. How con I create a recognizer with opencv 3.4.0 in python 3.6.4 64bit ?

edit retag flag offensive close merge delete

Comments

please use read/write OR save/load consistantly (both write different files)

berak gravatar imageberak ( 2018-03-13 04:02:41 -0500 )edit

I used this line in trainer to create the file recognizer.save('trainer/trainer.yml') and this two lines to create a recognzer and load the file created in the code self.recognizer = cv2.face.LBPHFaceRecognizer_create() self.recognizer.load("trainer/trainer.yml") #raises the error of the question here Hope you can help me sorry if I don't understood well what you said

Edocit gravatar imageEdocit ( 2018-03-13 05:40:22 -0500 )edit

again, please use read() and write() instead

berak gravatar imageberak ( 2018-03-13 05:43:05 -0500 )edit

I am probably facing a similar error which involves the usage of this function,please help! The code is->

face_recognizer = cv2.face_LBPHFaceRecognizer.create()

AttributeError: module 'cv2' has no attribute 'face_LBPHFaceRecognizer'

I am using python 3.6 and opencv_3.4.3. I am a beginner. Please help!

Paras Jain gravatar imageParas Jain ( 2018-11-12 22:04:06 -0500 )edit