简体   繁体   中英

Face recognition using python and opencv

I want to work on this face recognition project but when I run the train.py , I get the following error:

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

I've googled it but I didn't find anything useful.

I'm running python 2.7 and OpenCV 3.2.0 .

Any help would be appreciated.

As @DanMašek in the comments said, the answer is to add the open_contrib module in the OpenCV to use face module. It can be done while installing OpenCV, like this:

brew install opencv3 --with-contrib

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM