Home › Forums › Fórum Reconhecimento Facial com Python e OpenCV › Erro: module ‘cv2’ has no attribute ‘face’
- This topic has 3 replies, 2 voices, and was last updated 5 years, 1 month ago by
Gabriel Alves.
Viewing 4 posts - 1 through 4 (of 4 total)
- AuthorPosts
- 24 de abril de 2021 at 14:47 #28486
import cv2 import os import numpy as np eigenface = cv2.face.EigenFaceRegconizer_create() fisherface = cv2.face.FisherFaceRecognizer_create() lbph = cv2.face.LBPHFaceRecognizer_create() def getImageComId(): caminhos = [os.path.join('fotos', f) for f in os.listdir('fotos')] print(caminhos) getImageComId()O meu código está assim, porém está retornando que no módulo cv2 não há o atributo face. Como proceder?
- This topic was modified 5 years, 1 month ago by
igorbarrera.
24 de abril de 2021 at 14:58 #28488Procurei na internet e achei a resposta, segue abaixo:
- This reply was modified 5 years, 1 month ago by
igorbarrera.
24 de abril de 2021 at 14:59 #28489Estou usando o OpenCv instalado na virtualenv, pode ser que tenha alguma implicação, porém, se der erro para mais alguém está ai a solução:
pip install opencv-contrib-python
- This reply was modified 5 years, 1 month ago by
igorbarrera. Reason: Correções, não funcionou com -user
25 de abril de 2021 at 13:12 #28497Olá Igor,
que bom que já conseguiu resolver o problema, e obrigado por postar sua solução!
- This topic was modified 5 years, 1 month ago by
- AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
