recognizer = cv2.face.LBPHFaceRecognizer_create() AttributeError: module 'cv2.cv2' has no attribute 'face' in pycharm 2018 and using opencv2

asked 2019-09-25 04:37:42 -0600

ankitcodes gravatar image

i got an error while detection.so please see to it and tell me what to use so that it works and i can find solution to this problem

edit retag flag offensive close merge delete

Comments

doc is here but which opencv (opencv_contrib) version do you use?

LBerger gravatar imageLBerger ( 2019-09-25 05:00:32 -0600 )edit

You need to install this: sudo pip install opencv-contrib-python or sudo pip3 install opencv-contrib-python for python 3. Before install, sudo apt-get update && sudo apt-get upgrade -y

supra56 gravatar imagesupra56 ( 2019-09-25 05:04:11 -0600 )edit

hey i have done all,othe above but still etting an error

ankitcodes gravatar imageankitcodes ( 2019-09-25 05:34:31 -0600 )edit

i am using version contrib 1.17.2

ankitcodes gravatar imageankitcodes ( 2019-09-25 05:52:41 -0600 )edit
LBerger gravatar imageLBerger ( 2019-09-25 06:04:43 -0600 )edit

@ankitcodes. I need to know what is your opencv version and it is python 2 or python 3?

supra56 gravatar imagesupra56 ( 2019-09-25 06:30:47 -0600 )edit