简体   繁体   English

即使我已经在 pycharm window 中安装了它的库,cv2.face.LBPHFaceRecognizer_create() 也无法正常工作。 该怎么办?

[英]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.我正在尝试在我的程序中使用'''cv2.face.LBPHFaceRecognizer_create()''',但出现此错误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.我已经安装了这个 function 所需的所有以下库,但仍然没有解决方案。 I am this program on pycharm windows 10.我是 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.我试过卸载 OpenCV,重新安装,卸载然后安装 contrib 版本。 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.我见过有人说使用 Jupyter notebook 可能是个问题,但我也在 Spyder 中尝试过,但也没有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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