Ask Your Question
0

face module missing from python cv2 version 3.3.0

asked 2017-09-20 19:01:04 -0600

I have cv2 version 3.3.0 installed, as verified by printing cv2.__ version __

It is my understanding that version 3.3.0 should have the face module by default, as per this official documentation: http://docs.opencv.org/3.3.0/db/d7c/group__face.html

I installed opencv-python via pip.

Any ideas what is going wrong and how I can fix it?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-09-20 21:06:36 -0600

berak gravatar image

the face module (like text,tracking and others) are in a seperate opencv_contrib repository, your installation does not have any of it.

you could retry with https://pypi.python.org/pypi/opencv-c...

(but installing via PIP has known downsides, like no gui or video file support)

maybe you want/need to install from src: https://github.com/opencv/opencv_contrib

edit flag offensive delete link more

Comments

OpenCV in homebrew is built with contrib modules by default, according to this.

However, I just tried reinstalling opencv and got this message:

Python modules have been installed and Homebrew's site-packages is not
in your Python sys.path, so you will not be able to import the modules
this formula installed. If you plan to develop with these modules,
please run:
  mkdir -p /Users/cjoseph/.local/lib/python2.7/site-packages
  echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/cjoseph/.local/lib/python2.7/site-packages/homebrew.pth

I ran it and that solved my problem.

cjoseph gravatar imagecjoseph ( 2017-09-20 23:56:55 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-09-20 19:01:04 -0600

Seen: 1,789 times

Last updated: Sep 20 '17