OpenCV:AttributeError:模块"cv2"没有属性"face"
问题描述:
我正在以下版本上使用Python和OpenCV创建人脸识别系统:
I am creating a face recognition system using Python and OpenCV on these versions:
- Python 3.6.2 :: Anaconda自定义(64位)
- Anaconda 4.3.23
- OpenCV 3.3.0
当我尝试训练人脸识别器时:
When I try to train the face recognizer:
face_recognizer = cv2.face.createLBPHFaceRecognizer()
我收到此错误:
AttributeError:模块'cv2'没有属性'face'
AttributeError: module 'cv2' has no attribute 'face'
更新:
我试图做到这一点:
pip install opencv_python‑3.3.0+contrib‑cp36‑cp36m‑win_amd64.whl
也:
conda install -c menpo opencv3=3.3.0
我仍然有错误.