thecodacus / Face-Recognition

Face Recognition tutorial code
Apache License 2.0
81 stars 73 forks source link

Attribute error Module 'CV2' has no attribute createLBPHFaceRecognizer #3

Closed guruvishnuvardan closed 6 years ago

guruvishnuvardan commented 7 years ago

Hi,

I have Installed OpenCV 3.3 and OpenCV Contrib (with out CUDA), Can you please help me to resolve this defect. Also, Can you please suggest me, If there is anything wrong in installing OpenCV_Contrib

open_contrib_error

pomaranczowykoles commented 6 years ago

change to recognizer = cv2.face.LBPHFaceRecognizer_create() recognizer.read('trainer/trainer.yml')

thecodacus commented 6 years ago

I guessing the issue is resolved so closing it

hunaidkhan2000 commented 6 years ago

AttributeError: module 'cv2.cv2' has no attribute 'face', after trying above recognizer = cv2.face.LBPHFaceRecognizer_create() . still getting error

aaroexxt commented 6 years ago

same. I am also getting the above error. I have opencv-contrib-python installed as well.

Rich2020 commented 6 years ago

Same here.

aaroexxt commented 6 years ago

I fixed this issue with two commands: First: sudo pip3 uninstall opencv-contrib-python Second: sudo python3 -m pip install opencv-contrib-python==3.3.0.9 This fixed my issues. Hope it helps somebody! Also, if you are using python2, replace “pip3” with “pip” and “python3” with “python”

Rich2020 commented 6 years ago

Using IntelliJ, I created a new virtual environment and installed the opencv and contrib libraries; this fixed it.

naren-sai-krishna commented 6 years ago

Thanks a lot @aaroexxt ... It worked for me .

shwetabh12 commented 5 years ago

Screenshot from 2019-03-09 21-04-15 As I am running on jupyter notebook on Kaggle platform ,How to get rid of these error .

Priyanknasit commented 5 years ago

Screenshot from 2019-03-09 21-04-15 As I am running on jupyter notebook on Kaggle platform ,How to get rid of these error .

use this.. pip install opencv-contrib-python --upgrade

maanyapathak commented 6 months ago

there is what worked for me i had installed opencv-python but not opencv-contrib-python so when i installed opencv-contrib-python it worked i didn;t even needed to uninstall opencv-python