I am trying to use LBPHfacerecognizer in my python3.6 code.
recognizer = cv2.face.createLBPHFaceRecognizer()
I am aware that face module is in opencv_contrib module. I even uninstalled openCV and installed again with contrib module. I compiled OpenCV with it and python still gives an error which is:
AttributeError: module 'cv2.cv2' has no attribute 'face'
Although in opencv/build/lib I have libopencv_face.dylib, it doesn't compile with python3 and opencv.
I tried everything I can think of but I am running out of ideas.
Any ideas?
edit: Python doesn't give an error when I am working under python3 environment anymore but I still have the same error when I try to run my code in the terminal.
What I am trying to run:
python3 main.py
Any ideas why I have this problem or how I can fix it?