简体   繁体   中英

cv2.face.LBPHFaceRecognizer_create() is not working even though i have installed the library of it in pycharm window. what to do?

I am trying to use '''cv2.face.LBPHFaceRecognizer_create()''' in my program but this error came AttributeError: module 'cv2.cv2' has no attribute 'face' on pycharm. I had install all the following libraries required for this function but still no solution. I am this program on pycharm windows 10.

Do:

 pip install opencv-contrib-python

and then try again. This worked for me

I also have the same issue, unfortunately the suggestion often given (such as above) does not rectify the issue for me. I've tried uninstalling OpenCV, reinstalling, uninstalling and then installing the contrib version. Nothing works. I've seen some people say that using a Jupyter notebook could be the problem but I tried it in Spyder as well and this also didn't work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM