Ask Your Question

AttributeError: 'module' object has no attribute 'face' Pycharm OS

asked 2017-12-02 12:41:52 -0500

Hello I am trying to run various face recognition programs (for example: Though every program I run that requires recognition I receive the same error:

" recognizer = cv2.face.createLBPHFaceRecognizer() AttributeError: 'module' object has no attribute 'face' "

I am running my programs on Pycharm, Mac OS, and using cv2 version 3.10

edit retag flag offensive close merge delete


Have you build opencv_contrib (same version than opencv )?

LBerger gravatar imageLBerger ( 2017-12-02 13:41:55 -0500 )edit

I've download the opencv_contrib but i'm having trouble following the directions to fix the issue

Purple38 gravatar imagePurple38 ( 2017-12-02 13:51:05 -0500 )edit

Where do you download opencv_contrib?

LBerger gravatar imageLBerger ( 2017-12-02 14:10:56 -0500 )edit


I assume I need to face module from it, yet i'm not sure how to go about adding it to my current opencv

Purple38 gravatar imagePurple38 ( 2017-12-02 14:20:12 -0500 )edit

Then you need to build opencv and opencv_contrib ...

LBerger gravatar imageLBerger ( 2017-12-02 15:03:03 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2017-12-02 21:06:47 -0500

supra56 gravatar image

pip install opencv-contrib

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-12-02 12:41:52 -0500

Seen: 724 times

Last updated: Dec 02 '17